summaryrefslogtreecommitdiff
path: root/lib/autouse.pm
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-05-29 20:12:09 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-05-29 20:12:09 +0000
commitf1c689a86c4d291fc38042ab6974540507ad0175 (patch)
tree7a618bd2fbc25f71070779b9913a6d6f6fe225af /lib/autouse.pm
parent55bceba65f83da05702b3603a0967b74e0c73135 (diff)
downloadperl-f1c689a86c4d291fc38042ab6974540507ad0175.tar.gz
Retract #10243.
p4raw-id: //depot/perl@10300
Diffstat (limited to 'lib/autouse.pm')
-rw-r--r--lib/autouse.pm3
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"