summaryrefslogtreecommitdiff
path: root/pod
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-12-01 19:09:31 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-12-01 19:09:31 +0000
commitf784dfa3907dda58a76b5d8c67d99274984dc87a (patch)
treec396eb52eade217633c030017e4dfa21b50b516e /pod
parentcc3604b14c0748189384ba69182e0ae2c73a4d88 (diff)
downloadperl-f784dfa3907dda58a76b5d8c67d99274984dc87a.tar.gz
more accurate require() pseudocode (from James P. Williams
<James.P.Williams@USAHQ.UnitedSpaceAlliance.com>) p4raw-id: //depot/perl@4610
Diffstat (limited to 'pod')
-rw-r--r--pod/perlfunc.pod3
1 files changed, 2 insertions, 1 deletions
diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod
index 16da798a02..fa67babc57 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;
}