From: Jarkko Hietaniemi Date: Tue, 29 May 2001 20:12:09 +0000 (+0000) Subject: Retract #10243. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f1c689a86c4d291fc38042ab6974540507ad0175;p=p5sagit%2Fp5-mst-13.2.git Retract #10243. p4raw-id: //depot/perl@10300 --- diff --git a/lib/autouse.pm b/lib/autouse.pm index 7fb318b..15335b7 100644 --- a/lib/autouse.pm +++ b/lib/autouse.pm @@ -39,7 +39,7 @@ sub import { my $closure_import_func = $func; # Full name my $closure_func = $func; # Name inside package - my $index = rindex($func, '::'); + my $index = index($func, '::'); if ($index == -1) { $closure_import_func = "${callpkg}::$func"; } else { @@ -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"