in reply to Re^6: Creating flexible method accessor
in thread Creating flexible method accessor
Then you might want to start looking into CPAN modules, for example a really quick search brings up Data::Path.
Otherwise, although I would really try to avoid string eval as much as possible, when it is used it's best to limit its scope as much as possible: $self = eval qq{ \$self->$path }; die $@ if $@;
|
---|
In Section
Seekers of Perl Wisdom