Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

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

by jgallagher (Pilgrim)
on Jul 08, 2005 at 21:56 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://473579]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (2)
As of 2024-03-19 04:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found