in reply to Re^2: symbolic references in a hash lookup
in thread symbolic references in a hash lookup
I would suggest restructuring your my $accessors (untested):
Then set the CODE values:my $accessors = { map ({$_=>{TYPE=>'getter',CODE=>undef}} qw |my gett +er names| ), map ({$_=>{TYPE=>'setter',CODE=>undef}} qw |setter +names2|) };
for (keys %$accessors){ if ($accessor->{$_}{TYPE} eq 'getter'){ $accessor->{$_}->{CODE} = sub {set code}; }else{ .. setter ... }
Potentia vobiscum ! (Si hoc legere scis nimium eruditionis habes)
|
|---|