--- AutoLoader.pm.orig 2006-06-18 16:18:30.000000000 +0200 +++ AutoLoader.pm 2006-06-18 16:20:10.000000000 +0200 @@ -89,7 +89,7 @@ } my $save = $@; local $!; # Do not munge the value. - eval { local $SIG{__DIE__}; require $filename }; + my $ref; $ref = eval { local $SIG{__DIE__}; require $filename }; if ($@) { if (substr($sub,-9) eq '::DESTROY') { no strict 'refs'; @@ -102,7 +102,7 @@ # There is a slight risk that we could pick up the wrong file here # but autosplit should have warned about that when splitting. if ($filename =~ s/(\w{12,})\.al$/substr($1,0,11).".al"/e){ - eval { local $SIG{__DIE__}; require $filename }; + $ref = eval { local $SIG{__DIE__}; require $filename }; } } if ($@){ @@ -113,6 +113,7 @@ } } $@ = $save; + goto $ref if ref($ref) && ref($ref) eq 'CODE'; goto &$sub; }