Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Something like c++'s static?

by BUU (Prior)
on Aug 02, 2002 at 17:00 UTC ( [id://187149]=note: print w/replies, xml ) Need Help??


in reply to Something like c++'s static?

you probably want something like this:
package baz; { my $static=1; sub new{return bless my $x;} }
But note that '$static' is completely hidden unless your class has an accessor method. Or you could just use a class global, in the form of '$baz::foo=12;'

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2024-04-19 21:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found