Help for this page

Select Code to Download


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