Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct documentation of require's handling of %INC #796

Closed
p5pRT opened this issue Oct 29, 1999 · 1 comment
Closed

Correct documentation of require's handling of %INC #796

p5pRT opened this issue Oct 29, 1999 · 1 comment

Comments

@p5pRT
Copy link

p5pRT commented Oct 29, 1999

Migrated from rt.perl.org#1723 (status was 'resolved')

Searchable as RT1723$

@p5pRT
Copy link
Author

p5pRT commented Oct 29, 1999

From mjtg@cus.cam.ac.uk

Mike Guy

Inline Patch
--- ./pod/perlfunc.pod.orig	Wed Oct 13 17:13:36 1999
+++ ./pod/perlfunc.pod	Fri Oct 29 17:35:20 1999
@@ -3411,15 +3411,16 @@
 	    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;
     }
 

End of patch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant