diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-05-29 20:12:09 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-05-29 20:12:09 +0000 |
commit | 0a61bf196553f9ccead8903f4fc819937dabd995 (patch) | |
tree | 7a618bd2fbc25f71070779b9913a6d6f6fe225af /lib | |
parent | e996738e309720060c955fe8da6802b99cc87c93 (diff) | |
download | perl-0a61bf196553f9ccead8903f4fc819937dabd995.tar.gz |
Retract #10243.
p4raw-id: //depot/perl@10300
Diffstat (limited to 'lib')
-rw-r--r-- | lib/autouse.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/autouse.pm b/lib/autouse.pm index 7fb318be1c..15335b7cf9 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" |