Re: Nomenclature Question - BEGIN etc.

2008-04-11 Thread TSa
HaloO, Larry Wall wrote: Hmm, maybe "control event blocks" and "control events", then... I would call them flow blocks because this is where they are called and what they influence: the flow of execution. This nicely matches the flow charts used to describe the control flow. The other term I

Re: default parameters in methods

2008-04-11 Thread John M. Dlugosz
Larry Wall larry-at-wall.org |Perl 6| wrote: All default expressions to any parameter are defined to run in the context that assumes any parameters to their left are already bound, so you may safely depend on self already being set. OK, so there is no technical reason why it can't work tha

Symbolic references and OUTER

2008-04-11 Thread John M. Dlugosz
OUTER::<$varname> (S06, "Out-of-scope names") $OUTER::varname (S02, "Names") specifies the $varname declared in the lexical scope surrounding the current lexical scope (i.e. the scope in which the current block was defined). sub outersub () { my $a; my $b; my $closure = sub { say $a; #

Symbolic references and OUTER

2008-04-11 Thread Bob Rogers
From: "John M. Dlugosz" <[EMAIL PROTECTED]> Date: 11 Apr 2008 20:12:41 - . . . What happens? The OUTER scope no longer exists at CALL 3. Does a symbolic reference to OUTER require that the entire scope be retained, just in case? If "OUTER" itself (or OUTER::OUTER::...) is

What is the "self pragma"?

2008-04-11 Thread John M. Dlugosz
In S06, "A method's invocant always has the alias self. Other styles of self can be declared with the self pragma." What is the self pragma, and what are other styles of self, prey tell? --John

quick ones on subs

2008-04-11 Thread John M. Dlugosz
In S06, a wrong word: "Alternately, optional fields may be marked by supplying a default value. " should be parameters, not fields. Now here is my question: Params are bound in declaration order, not call order, and may refer to previous parameters. But what if a multi makes use of your intenti

slurpy scalar parameter?

2008-04-11 Thread John M. Dlugosz
What is the difference between: sub head(*$head, [EMAIL PROTECTED]) and sub head($head?, [EMAIL PROTECTED]) ? The example calls it with head( 1,2,3,4 ); I'm thinking that there are differences that are not apparent in this example. --John

Re: slurpy scalar parameter?

2008-04-11 Thread Ryan Richter
On Sat, Apr 12, 2008 at 05:06:53AM -, John M. Dlugosz wrote: > What is the difference between: > > sub head(*$head, [EMAIL PROTECTED]) > > and > > sub head($head?, [EMAIL PROTECTED]) > If you call head(@foo), in the first $head gets @foo[0] and in the second it gets nothing (you didn't p