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
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
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; #
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
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
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
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
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