How can I set a Java-like "static variable" in Perl that can be accessed by other classes ? -
A and B, I need to set a static variable (such as a variable variable in Java) in class A. I
, and access to variable from class B (Java Using the classname. Variable name). Can I do something like this in Perl?
Thank you in advance
I do not know if I do not really know Java What I mean by "static variable" is what is to do with scoping? In Perl 'my' and 'our' you can control the scope, but I believe that I am right that the cap package / module creates the variable "personal" which is Use the packages to store personal data in libraries , Modules, and classes, so it does not conflict with it if you see data in your main program that someone writes Documentation and this can help you to be clear in your thinking about variables and scope in Perl. The classic perlmax node - - often referred context is: -) If you already know how to program (i.e. in Java) sometimes a better reference (only Cheers, for working in Pearl "How To" Pearl cookbook . .pm The file is declared << Strong> How to "access" my copy of the programming Pearl (second edition) to include them in the chapter? 2 Scoded Declaration But before page 117 there is a small (slightly edited) portion of the footnote:
$ Some :: stuff then that package
some < $ / Value> using the $ $ scalar variable May include.
Comments
Post a Comment