From: Perl 5 Porters Date: Tue, 2 Jan 1996 03:10:36 +0000 (+0000) Subject: Avoid tainting problems. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5b930e62b086683d709a191483147bd1b22bc687;p=p5sagit%2Fp5-mst-13.2.git Avoid tainting problems. --- diff --git a/lib/AutoLoader.pm b/lib/AutoLoader.pm index ea19e50..766de1e 100644 --- a/lib/AutoLoader.pm +++ b/lib/AutoLoader.pm @@ -20,7 +20,8 @@ autoloaded from F. See L. =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; }