- or download this
package MyApp {
use MooX::Press class => ['Foo', 'Bar'];
}
my $thing1 = MyApp::Foo->new();
my $thing2 = MyApp->new_foo(); # alternative constructor
- or download this
package MyApp::Zoo;
use MooX::Press (
role => [
...
},
],
);
- or download this
use Moo;
use MyApp::Zoo::Types qw(Kangaroo);
has mascot => (is => 'ro', isa => Kangaroo);
- or download this
use MyApp::Zoo::Types qw(is_Kangaroo);
$thing->jump if is_Kangaroo($thing);
- or download this
use MyApp::Zoo ();
my $lenny = MyApp::Zoo->new_shark(name => 'Lenny');
...
my $tank = MyApp::Zoo::Enclosure::Tank->new(
animals => [ $lenny ],
);