Skip to content
This repository
Browse code

[S06] rw parameters can never be optional

You can't put a default on a parameter marked "rw".
  • Loading branch information...
commit 44511d749bbbae4286dd1675ad6264c72acd2433 1 parent 977d920
Larry Wall authored

Showing 1 changed file with 5 additions and 3 deletions. Show diff stats Hide diff stats

  1. 8  S06-routines.pod
8  S06-routines.pod
Source Rendered
@@ -16,8 +16,8 @@ Synopsis 6: Subroutines
16 16
 
17 17
     Created: 21 Mar 2003
18 18
 
19  
-    Last Modified: 25 Oct 2010
20  
-    Version: 145
  19
+    Last Modified: 16 Nov 2010
  20
+    Version: 146
21 21
 
22 22
 This document summarizes Apocalypse 6, which covers subroutines and the
23 23
 new type system.
@@ -2201,7 +2201,9 @@ to a readonly parameter never triggers autovivification.
2201 2201
 
2202 2202
 Specifies that the parameter can be modified (assigned to, incremented,
2203 2203
 etc). Requires that the corresponding argument is an lvalue or can be
2204  
-converted to one.
  2204
+converted to one.  Since this option forces an argument to be required,
  2205
+it cannot co-exist with any marks that indicate an optional parameter,
  2206
+such as C<?> or a default value.
2205 2207
 
2206 2208
 When applied to a variadic parameter, the C<rw> trait applies to each
2207 2209
 element of the list:

0 notes on commit 44511d7

Please sign in to comment.
Something went wrong with that request. Please try again.