Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
it's illegal to assign/bind a non-existing dynvar
You must use the GLOBAL:: package explicitly in this case.
  • Loading branch information
TimToady committed Nov 19, 2010
1 parent dd9966d commit f648072
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions S02-bits.pod
Expand Up @@ -13,8 +13,8 @@ Synopsis 2: Bits and Pieces

Created: 10 Aug 2004

Last Modified: 17 Nov 2010
Version: 229
Last Modified: 19 Nov 2010
Version: 230

This document summarizes Apocalypse 2, which covers small-scale
lexical items and typological issues. (These Synopses also contain
Expand Down Expand Up @@ -2909,6 +2909,15 @@ to all the subprocesses granted that privilege.

=item *

It is illegal to assign or bind a dynamic variable that does not already exist.
It will not be created in C<GLOBAL> (or C<PROCESS>) automatically, nor is it
created in any lexical scope. Instead, you must assign directly using the
package name to get that to work:

GLOBAL::<$mynewvar> = $val;

=item *

The magic command-line input handle is C<$*ARGFILES>.
The arguments themselves come in C<@*ARGS>. See also "Declaring a MAIN
subroutine" in S06.
Expand Down

0 comments on commit f648072

Please sign in to comment.