From: Gurusamy Sarathy Date: Wed, 1 Dec 1999 19:09:31 +0000 (+0000) Subject: more accurate require() pseudocode (from James P. Williams X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f784dfa3907dda58a76b5d8c67d99274984dc87a;p=p5sagit%2Fp5-mst-13.2.git more accurate require() pseudocode (from James P. Williams ) p4raw-id: //depot/perl@4610 --- diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index 16da798..fa67bab 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -3424,15 +3424,16 @@ subroutine: foreach $prefix (@INC) { $realfilename = "$prefix/$filename"; if (-f $realfilename) { + $INC{$filename} = $realfilename; $result = do $realfilename; last ITER; } } die "Can't find $filename in \@INC"; } + delete $INC{$filename} if $@ || !$result; die $@ if $@; die "$filename did not return true value" unless $result; - $INC{$filename} = $realfilename; return $result; }