Mar 30, 2012, 2:15 PM
Static in the sense that the class is only loaded once.
Re: [ChopperCharles] private and protected methods
Each instance does not create a new copy of the parent. So in a sense, these variables become static, but they are global to the class and subclasses via the accessors/setters.
If you wanted to track the number of instances loaded, you would use a class attribute, and increment it in new. Then create a sub DESTROY to decrement the attribute when objects are released.
Again, I think you should read the perldocs for OO and check out some comparisons, what you can and cannot do with Perl OOP. There are a lot of good examples in the perldocs that will answer a lot the questions you have and will have as you progress.
If you are looking for a good book on Perl OO - get "Object Oriented Perl" by D. Conway. He explains what each OO concept is and how it applies to Perl.
(This post was edited by budman on Mar 30, 2012, 2:17 PM)