Help for this page

Select Code to Download


  1. or download this
    package Body;
    use Moose;
    ...
    print $body->eyes;   ## and they're blue
    $body->eyes(new Eyes(color=>'brown')); 
    $body->eyes->color('green');
    
  2. or download this
    package MooseX::NestedPackage;
    use Moose;
    ...
        ## cos defaults should go directly in each nested attribute
        $attr->{lazy} = 0;  ## lazy stopped working outside due to a missi
    +ng default
    };