Help for this page

Select Code to Download


  1. or download this
    package My::Parent;
    use warnings;
    ...
    sub _frobnicate { $_[0]{a} + $_[0]{b} }
    
    __PACKAGE__
    
  2. or download this
    #!/usr/bin/perl
    use warnings;
    ...
    
    my $p = 'My::Parent'->new( { a => 2, b => 3 } );
    is $p->frobnicate, 5, 'frobnicates';
    
  3. or download this
    package My::SimpleChild;
    
    ...
    }
    
    __PACKAGE__
    
  4. or download this
    #!/usr/bin/perl
    use warnings;
    ...
    
    my $s = 'My::SimpleChild'->new({ a => 2, b => 3 });
    is $s->frob, 5, 'frobs';
    
  5. or download this
    package My::MooseChild;
    use Moose;
    ...
    
    no Moose;
    __PACKAGE__->meta->make_immutable
    
  6. or download this
    #!/usr/bin/perl
    use warnings;
    ...
    
    my $m = 'My::MooseChild'->new(a => 2, b => 3);
    is $m->frob, 5, 'frobs';
    
  7. or download this
    package My::DelegChild;
    use Moose;
    ...
    
    no Moose;
    __PACKAGE__->meta->make_immutable
    
  8. or download this
    #!/usr/bin/perl
    use warnings;
    ...
    
    my $ch = 'My::DelegChild'->new(a => 2, b => 3);
    is $ch->frob, 5, 'frobs';
    
  9. or download this
    ($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord
    }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,