in reply to fast import?
While you could get this working under strict, it would mean going through many hoops to avoid symbolic referencing, so this is one of those cases where turning off strictures is a good idea
The only reason I can think for using Exporter apart from laziness, is it can export symbols to a higher calling frame, otherwise I reckon Juerd's Exporter::Tidy is pretty ideal## limit the disabling of strict refs to this scope { ## let us do symbolic referencing no strict 'refs' sub import { ## get the caller once my $pkg = caller; for(qw/ sub1 sub2 /) { ## don't over-write existing subs *{"$pkg\::$_"} = \&$_ unless defined &{"$pkg\::$_"}; } } }
_________
broquaint
1 just realised this doesn't make any sense. move along folks
|
|---|