X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2Fautouse.pm;h=15335b7cf9b88bacf979f4bbf80ba72e0a002195;hb=f1c689a86c4d291fc38042ab6974540507ad0175;hp=4445c6c419bd272edf487250741d48d51cea1bad;hpb=2f34f9d4825ac9262ece854fc4c50479f4838ff8;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/autouse.pm b/lib/autouse.pm index 4445c6c..15335b7 100644 --- a/lib/autouse.pm +++ b/lib/autouse.pm @@ -3,7 +3,7 @@ package autouse; #use strict; # debugging only use 5.003_90; # ->can, for my $var -$autouse::VERSION = '1.01'; +$autouse::VERSION = '1.02'; $autouse::DEBUG ||= 0; @@ -25,7 +25,7 @@ sub import { vet_import $module; local $Exporter::ExportLevel = $Exporter::ExportLevel + 1; # $Exporter::Verbose = 1; - return $module->import(map { (my $f = $_) =~ s/\(.*?\)$// } @_); + return $module->import(map { (my $f = $_) =~ s/\(.*?\)$//; $f } @_); } # It is not loaded: need to do real work. @@ -54,6 +54,7 @@ sub import { die if $@; vet_import $module; } + no warnings 'redefine'; *$closure_import_func = \&{"${module}::$closure_func"}; print "autousing $module; " ."imported $closure_func as $closure_import_func\n" @@ -116,7 +117,7 @@ with the correct definitions. Using C will move important steps of your program's execution from compile time to runtime. This can -=over +=over 4 =item *