Help for this page

Select Code to Download


  1. or download this
    
    package CirculatorySystem;
    ...
    print $nexus_6->circulatory_system->pressure;
    # is the same as ...
    print $nexus_6->eyes->blood_pressure;
    
  2. or download this
    has [qw[ eyes ears nose mouth ]] => (is => 'rw');
    around [qw[ eyes ears nose mouth ]] => sub { ... code to make accessor
    +s return $self here ... }
    
  3. or download this
    my @parts = qw[ eyes ears nose mouth ];
    has $_ => (
        is        => 'rw',
        predicate => "has_$_"
    ) foreach @parts;