From: M. J. T. Guy Date: Tue, 28 Jul 1998 12:44:36 +0000 (+0100) Subject: document return values of do() better X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8e30cc93fcf10cc99533d7ed3161b6c4a0fabd93;p=p5sagit%2Fp5-mst-13.2.git document return values of do() better Message-Id: Subject: [PATCH] Re: Obscurity of lexicals with do "" p4raw-id: //depot/maint-5.005/perl@1683 --- diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index 35cab3a..69dd5aa 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -915,6 +915,12 @@ scope like C does. It's the same, however, in that it does reparse the file every time you call it, so you probably don't want to do this inside a loop. +If C cannot read the file, it returns undef and sets C<$!> to the +error. If C can read the file but cannot compile it, it +returns undef and sets an error message in C<$@>. If the file is +successfully compiled, C returns the value of the last expression +evaluated. + Note that inclusion of library modules is better done with the C and C operators, which also do automatic error checking and raise an exception if there's a problem.