summaryrefslogtreecommitdiff
path: root/lib/AutoLoader.pm
diff options
context:
space:
mode:
authorPerl 5 Porters <perl5-porters.nicoh.com>1996-01-02 03:10:36 +0000
committerAndy Dougherty <doughera.lafayette.edu>1996-01-02 03:10:36 +0000
commit5b930e62b086683d709a191483147bd1b22bc687 (patch)
treef653df9bc8af5bda2ca87da5abab5e9d82ef4312 /lib/AutoLoader.pm
parentdd6decf0ecc1084ce27bf33d6b21eccb4b0a6b07 (diff)
downloadperl-5b930e62b086683d709a191483147bd1b22bc687.tar.gz
Avoid tainting problems.
Diffstat (limited to 'lib/AutoLoader.pm')
-rw-r--r--lib/AutoLoader.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/AutoLoader.pm b/lib/AutoLoader.pm
index ea19e502a0..766de1e894 100644
--- a/lib/AutoLoader.pm
+++ b/lib/AutoLoader.pm
@@ -20,7 +20,8 @@ autoloaded from F<auto/$AUTOLOAD.al>. See L<perlsub/"Autoloading">.
=cut
AUTOLOAD {
- my $name = "auto/$AUTOLOAD.al";
+ $AUTOLOAD =~ /([\w:]+)/; # avoid taint problems for eval require $name
+ my $name = "auto/$1.al";
$name =~ s#::#/#g;
eval {require $name};
if ($@) {
@@ -41,6 +42,7 @@ AUTOLOAD {
croak $@;
}
}
+ $DB::sub = $AUTOLOAD; # Now debugger know where we are.
goto &$AUTOLOAD;
}