in reply to Re: •Re: Re: Toggling between two values
in thread Toggling between two values
But I thought the "not stay shared" error is because the
closure stuff is triggering on a named subroutine (usually
inside another one). Is that not being closed on the first
invocation, and subsequent invocations creating different
lex vars?
And, on a completely different note, is this not a named closure?
That looks like I can call named_closure() to me, and it's a named closure.my $coderef = do { my $counter = 0; sub { ++$counter }; }; *named_closure = $coderef;
Perhaps that's not what
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re(5): Toggling between two values
by chip (Curate) on May 05, 2003 at 18:02 UTC |
In Section
Seekers of Perl Wisdom