Help for this page

Select Code to Download


  1. or download this
     my $accessors = { map ({$_=>{TYPE=>'getter',CODE=>undef}} qw |my gett
    +er names| ),
                       map ({$_=>{TYPE=>'setter',CODE=>undef}} qw |setter 
    +names2|)
                  };
    
  2. or download this
    for (keys %$accessors){
     if ($accessor->{$_}{TYPE} eq 'getter'){
    ...
     }else{
       .. setter ...
     }