Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Static Variables in Perl

by Anonymous Monk
on Mar 30, 2006 at 23:03 UTC ( [id://540313]=note: print w/replies, xml ) Need Help??


in reply to Static Variables in Perl

You can use Class::MethodMakers -static option.
perl -w package A; use Class::MethodMaker [ scalar => [{ -static => 1 }, 'knob1'], new => 'new']; package B; @ISA=('A'); $a=new A; $a->knob1(5); $b=new B; print $b->knob1; __END__ 5

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2024-03-28 12:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found