Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[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 44511d7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions S06-routines.pod
Expand Up @@ -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.
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 44511d7

Please sign in to comment.