Author: lwall
Date: 2009-10-01 18:53:43 +0200 (Thu, 01 Oct 2009)
New Revision: 28528

Modified:
   docs/Perl6/Spec/S04-control.pod
   docs/Perl6/Spec/S32-setting-library/Basics.pod
   docs/Perl6/Spec/S32-setting-library/IO.pod
Log:
[S04] add statement_prefix:<quietly>
[IO] add "note" function as say to stderr
[Basics] clarify semantics of warning exceptions


Modified: docs/Perl6/Spec/S04-control.pod
===================================================================
--- docs/Perl6/Spec/S04-control.pod     2009-10-01 11:49:58 UTC (rev 28527)
+++ docs/Perl6/Spec/S04-control.pod     2009-10-01 16:53:43 UTC (rev 28528)
@@ -13,8 +13,8 @@
 
     Created: 19 Aug 2004
 
-    Last Modified: 4 Sep 2009
-    Version: 82
+    Last Modified: 1 Oct 2009
+    Version: 83
 
 This document summarizes Apocalypse 4, which covers the block and
 statement syntax of Perl.
@@ -720,7 +720,7 @@
 X<do>
 
 Other similar forms, where a keyword is followed by code to be controlled by 
it, may also take bare statements,
-including C<try>, C<contend>, C<async>, C<lazy>, and C<void>.  These constructs
+including C<try>, C<quietly>, C<contend>, C<async>, C<lazy>, and C<void>.  
These constructs
 establish a dynamic scope without necessarily establishing a lexical
 scope.  (You can always establish a lexical scope explicitly by using
 the block form of argument.)  As statement introducers, all these
@@ -870,7 +870,7 @@
 
 The Perl 6 equivalent to Perl 5's C<eval {...}> is C<try {...}>.
 (Perl 6's C<eval> function only evaluates strings, not blocks.)
-A C<try> block by default has a C<CATCH> block that handles all
+A C<try> block by default has a C<CATCH> block that handles all fatal
 exceptions by ignoring them.  If you define a C<CATCH> block within
 the C<try>, it replaces the default C<CATCH>.  It also makes the C<try>
 keyword redundant, because any block can function as a C<try> block

Modified: docs/Perl6/Spec/S32-setting-library/Basics.pod
===================================================================
--- docs/Perl6/Spec/S32-setting-library/Basics.pod      2009-10-01 11:49:58 UTC 
(rev 28527)
+++ docs/Perl6/Spec/S32-setting-library/Basics.pod      2009-10-01 16:53:43 UTC 
(rev 28528)
@@ -19,8 +19,8 @@
 
     Created: 19 Mar 2009 extracted from S29-functions.pod
 
-    Last Modified: 30 Apr 2009
-    Version: 2
+    Last Modified: 1 Oct 2009
+    Version: 3
 
 The document is a draft.
 
@@ -191,9 +191,20 @@
 
  our multi method warn ( Object $o: ) is export
 
-Prints a warning to C<$*ERR>, which is usually finds C<$PROCESS::ERR>. See
-C<Synopsis 16: IPC / IO / Signals> for details.
+Throws a resumable warning exception, which is considered a control
+exception, and hence is invisible to most normal exception handlers.
+The outermost control handler will print the warning to C<$*ERR>
+(which is usually finds C<$PROCESS::ERR>; see C<Synopsis 16: IPC /
+IO / Signals> for details).  After printing the warning, the exception
+is resumed where it was thrown.  To override this behavior, catch the
+exception in a CONTROL block.  A quietly {...} block is the opposite of a
+try {...} block in that it will suppress any warnings but pass fatal
+exceptions through.
 
+To simply print to C<$*ERR>, please use C<note> instead.  C<warn>
+should be reserved for use in threatening situations when you don't
+quite want to throw an exception.
+
 =back
 
 =head2 Pattern

Modified: docs/Perl6/Spec/S32-setting-library/IO.pod
===================================================================
--- docs/Perl6/Spec/S32-setting-library/IO.pod  2009-10-01 11:49:58 UTC (rev 
28527)
+++ docs/Perl6/Spec/S32-setting-library/IO.pod  2009-10-01 16:53:43 UTC (rev 
28528)
@@ -22,8 +22,8 @@
 
     Created: 19 Feb 2009 extracted from S29-functions.pod; added stuff from 
S16-IO later
 
-    Last Modified: 18 Aug 2009
-    Version: 7
+    Last Modified: 1 Oct 2009
+    Version: 8
 
 The document is a draft.
 
@@ -92,6 +92,13 @@
 
 See below for details.
 
+=item note
+X<note>
+
+    multi note (*...@list --> Bool)
+
+See below for details.
+
 =item printf
 X<printf>
 
@@ -439,6 +446,10 @@
 As with C<print>, it is a compiler error to use a bare C<say> without
 arguments.
 
+=item multi note (*...@list --> Bool)
+
+Does a "say" to C<$*ERR>.
+
 =item method printf ($self: Str $fmt, *...@list --> Bool)
 
 =item multi printf (Str $fmt, *...@list --> Bool)

Reply via email to