- or download this
package MyClass;
...
sub foo { return 'foo'; }
1;
- or download this
package MyClass::Child;
...
sub bar { return 'bar'; }
1;
- or download this
#!/usr/bin/perl
use strict; use warnings; use feature 'say';
...
say $obj->bar;
__END__
- or download this
$ perl 1158279.pl
foo
bar
- or download this
package MyClass;
use Moo;
...
sub foo { return 'foo'; }
1;