package Foo; use warnings; use strict; foreach my $att (qw/name address age sex geek_code/) { no strict 'refs'; *$att = sub { my $self = shift; return $self->{data}->{$att}; }; }
In reply to Re: a simple matter of elegance
by snoopy
in thread a simple matter of elegance
by spiros
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |