Browse files

[S06] rw parameters can never be optional

You can't put a default on a parameter marked "rw".
  • Loading branch information...
TimToady committed Nov 17, 2010
1 parent 977d920 commit 44511d749bbbae4286dd1675ad6264c72acd2433
Showing with 5 additions and 3 deletions.
  1. +5 −3 S06-routines.pod
@@ -16,8 +16,8 @@ Synopsis 6: Subroutines
Created: 21 Mar 2003
- Last Modified: 25 Oct 2010
- Version: 145
+ Last Modified: 16 Nov 2010
+ Version: 146
This document summarizes Apocalypse 6, which covers subroutines and the
new type system.
@@ -2201,7 +2201,9 @@ to a readonly parameter never triggers autovivification.
Specifies that the parameter can be modified (assigned to, incremented,
etc). Requires that the corresponding argument is an lvalue or can be
-converted to one.
+converted to one. Since this option forces an argument to be required,
+it cannot co-exist with any marks that indicate an optional parameter,
+such as C<?> or a default value.
When applied to a variadic parameter, the C<rw> trait applies to each
element of the list:

0 comments on commit 44511d7

Please sign in to comment.