Re: State variables
- From: "A. Pagaltzis" <pagaltzis gmx de>
- To: gtk-perl-list gnome org
- Subject: Re: State variables
- Date: Thu, 4 May 2006 19:27:16 +0200
* Torsten Schoenfeld <kaffeetisch gmx de> [2006-05-04 19:05]:
If you put a block around a sub, you can declare a lexical
variable in that scope but outside the sub. It will then
behave like a state variable:
Is that really exactly what state variables do? So far, all
explanations about what state variables in Perl 6 are for have
left me confused. I assumed they work the way you outlined, but
all descriptions Iâve seen make them sound much more subtle and
hard to grasp.
Is that really all?
Regards,
--
#Aristotle
*AUTOLOAD=*_;sub _{s/(.*)::(.*)/print$2,(",$\/"," ")[defined wantarray]/e;$1};
&Just->another->Perl->hacker;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]