Author: moritz
Date: 2010-06-11 09:53:58 +0200 (Fri, 11 Jun 2010)
New Revision: 31190

[S06] more elaborate $*OUT/$*ERR selection for USAGE printing

This should make both avar++ happy who wants './prog --help|less' to DWHM,
and also TheDamian, who wants in good UNIX tradition a pipe of the form
'./prog | sort > file' to print usage messages to $*ERR to catch mistakes.

Modified: docs/Perl6/Spec/S06-routines.pod
--- docs/Perl6/Spec/S06-routines.pod    2010-06-11 06:11:20 UTC (rev 31189)
+++ docs/Perl6/Spec/S06-routines.pod    2010-06-11 07:53:58 UTC (rev 31190)
@@ -3102,8 +3102,11 @@
 If an attempted dispatch to C<MAIN> fails, the C<USAGE> routine is called.
 If there is no C<USAGE> routine, a default message is printed to standard
-output.  This
-usage message is automatically generated from the signature (or
+error. If the C<MAIN> routine does not declare a named parameter C<:$help>,
+and C<--help> is passed as a command line argument to the program, the usage
+message is printed to standard output instead.
+This usage message is automatically generated from the signature (or
 signatures) of C<MAIN>.  This message is generated at compile time,
 and hence is available at any later time as C<$?USAGE>.

Reply via email to