Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Static Variables in Perl

by Herkum (Parson)
on Mar 31, 2006 at 00:35 UTC ( [id://540330]=note: print w/replies, xml ) Need Help??


in reply to Static Variables in Perl

The key to a problem is identifying the real issue, the issue you are really having is that you want to abstract access of a variable in a particular namespace. But you want to ignore which namespace it is in. The thing about variables, they are bound to a particular namespace, you cannot have a variable be, $B::Knob1 and $A::Knob1.

So you have to write a method if you want to have one variable with everything being able to access that value from multiple namespaces.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2024-04-25 14:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found