Beta Shell
v2.0 ยท web2.us.cloudlogin.co
[FM]
[CMD]
[PHP]
[DB]
[INFO]
[SEC]
File Manager
~
/
usr
/
share
/
doc
/
perl-Mouse
/
example
Upload
5 items
Name
Size
Perms
Modified
Actions
[ .. / .. ]
point.pl
772 B
-rw-r--r--
2019-10-27 19:43:23
Edit
Del
traits.pl
438 B
-rw-r--r--
2019-10-27 19:43:23
Edit
Del
warns.pl
472 B
-rw-r--r--
2019-10-27 19:43:23
Edit
Del
Editing: warns.pl
(472 B)
Path: /usr/share/doc/perl-Mouse/example/warns.pl
Back
#!/usr/bin/perl package Point; use Mouse; use MouseX::StrictConstructor; # extra 'unknown_attr' is supplied (WARN) has 'x' => (isa => 'Int', is => 'rw', required => 1, unknown_attr => 1); # mandatory 'is' is not supplied (WARN) has 'y' => (isa => 'Int', required => 1); sub clear { my $self = shift; $self->x(0); $self->y(0); } __PACKAGE__->meta->make_immutable(); package main; # extra 'z' is supplied (FATAL) my $point1 = Point->new(x => 5, y => 7, z => 9);