Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^3: How will you use state declared variables in Perl6?

by jgallagher (Pilgrim)
on Jul 08, 2005 at 21:56 UTC ( #473579=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    package Bar;
    
    ...
      $bar++;
      return $bar;
    }
    
  2. or download this
    $bar1 = Bar->new();
    $bar2 = Bar->new();
    ...
    $bar1->foo(); # returns 1, as you would expect
    $bar1->foo(); # returns 2, as you would expect
    $bar2->foo(); # returns 3, possibly unexpected
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://473579]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (7)
As of 2015-07-29 10:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (263 votes), past polls