From: Daniel Grisinger Date: Fri, 15 May 1998 16:18:26 +0000 (-0600) Subject: [PATCH] _04m2 perlfunc.pod (fwd) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f4dad39ef1a76c1f6bbf6733d7c2ee209381be78;p=p5sagit%2Fp5-mst-13.2.git [PATCH] _04m2 perlfunc.pod (fwd) Date: Fri, 15 May 1998 16:18:26 -0600 (MDT) (above minus the t/system.t test pending checking) Subject: [PATCH] 5.004[04|65] FileHandle.pm Date: Wed, 20 May 1998 19:50:50 -0600 (MDT) Subject: [PATCH] _65 and _04 patching.pod Date: Thu, 21 May 1998 16:33:03 -0600 (MDT) p4raw-id: //depot/perl@1044 --- diff --git a/Porting/patching.pod b/Porting/patching.pod index b2a86b6..b528ad7 100644 --- a/Porting/patching.pod +++ b/Porting/patching.pod @@ -2,10 +2,10 @@ patching.pod - Appropriate format for patches to the perl source tree -=head2re to get this document +=head2 Where to get this document The latest version of this document is available from - http://www.tdrenterprises.com/perl/perlpatch.html + http://perrin.dimensional.com/perl/perlpatch.html =head2 How to contribute to this document @@ -130,8 +130,33 @@ block of code that you are patching. =item Testsuite -Also please include an addition to the regression tests to properly -exercise your patch. +When submitting a patch you should make every effort to also include +an addition to perl's regression tests to properly exercise your +patch. Your testsuite additions should generally follow these +guidelines (courtesy of Gurusamy Sarathy (gsar@engin.umich.edu))- + + Know what you're testing. Read the docs, and the source. + Tend to fail, not succeed. + Interpret results strictly. + Use unrelated features (this will flush out bizarre interactions). + Use non-standard idioms (otherwise you are not testing TIMTOWTDI). + Avoid using hardcoded test umbers whenever possible (the EXPECTED/GOT style + found in t/op/tie.t is much more maintainable, and gives better failure + reports). + Give meaningful error messages when a test fails. + Avoid using qx// and system() unless you are testing for them. If you + do use them, make sure that you cover _all_ perl platforms. + Unlink any temporary files you create. + Promote unforeseen warnings to errors with $SIG{__WARN__}. + Be sure to use the libraries and modules shipped with version being tested, + not those that were already installed. + Add comments to the code explaining what you are testing for. + Make updating the '1..42' string unnecessary. Or make sure that you update it. + Test _all_ behaviors of a given operator, library, or function- + All optional arguments + Return values in various contexts (boolean, scalar, list, lvalue) + Use both global and lexical variables + Don't forget the exceptional, pathological cases. =back @@ -261,7 +286,7 @@ mind. 8-) =head1 Last Modified -Last modified 1 May 1998 by Daniel Grisinger +Last modified 21 May 1998 by Daniel Grisinger =head1 Author and Copyright Information diff --git a/lib/FileHandle.pm b/lib/FileHandle.pm index 72ecdac..eec9b61 100644 --- a/lib/FileHandle.pm +++ b/lib/FileHandle.pm @@ -112,7 +112,7 @@ FileHandle - supply object methods for filehandles use FileHandle; $fh = new FileHandle; - if ($fh->open "< file") { + if ($fh->open("< file")) { print <$fh>; $fh->close; } diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index 6178798..80f1fe0 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -3676,7 +3676,7 @@ signals and core dumps. # forked, so the errno value is not visible in the parent. printf "command failed: %s\n", ($! || "Unknown system() error"); } - elsif ($rc > 0x80) { + elsif (($rc & 0xff) == 0) { $rc >>= 8; print "ran with non-zero exit status $rc\n"; }