Skip to content
This repository was archived by the owner on Jun 1, 2023. It is now read-only.
This repository was archived by the owner on Jun 1, 2023. It is now read-only.

Mu::new fields (args) not typechecked #387

@bbkr

Description

@bbkr

Following this blog post http://perl11.org/blog/cperl-classes.html on cperl v5.28.1c I get weird results:

$ cperl -e 'class Foo { has int $bar }; my $foo = Foo->new( bar => "baz" ); print $foo->bar'
bar

Should I use any special syntax (like :$bar) to indicate that param is named, not positional?
Why attribute with int type accepted string value?

Thanks for clarification.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions