This limits the scope of the no strict 'refs'. Otherwise, if you add any more code after the foreach, it will not be checked with strict.for my $f (@_) { no strict 'refs'; *{"$caller\::$f"} = sub { print "$f\n" }; }
In reply to Re^3: Using import to generate subroutines
by fergal
in thread Using import to generate subroutines
by Thilosophy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |