in reply to Re: RFC: Perl Second-Best Practices
in thread RFC: Perl Second-Best Practices
sfink is right. Also, japhy noticed recently that disabling strict references at the top of the scope there disables them inside the anonymous subroutine. It's better to declare the subroutine and then disable strict references and assign to the typeglob:
{ my $sub = sub { ... }; no strict 'refs'; *{ "${class}::get_${name}" } = $sub; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: RFC: Perl Second-Best Practices
by Aristotle (Chancellor) on Dec 26, 2005 at 12:26 UTC |