Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[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 TimToady authored
Showing with 5 additions and 3 deletions.
  1. +5 −3 S06-routines.pod
8 S06-routines.pod
View
@@ -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:
Please sign in to comment.
Something went wrong with that request. Please try again.