# Can variables be defined here? With package level # visibility?
Yes, but then they will be class variables, not object (instance) variables. Instance variables are defined within the constructor, as in the code shown.
Please note that we are talking here about Perl’s native, core OO facilities. Most OO Perl programmes are today written using Moose, Moo, Mouse, etc. (see Re^3: Class confusion when testing using ref()).
Hope that helps,
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
In reply to Re: Object oriented Perl and Java: A brief examination of design.
by Athanasius
in thread Object oriented Perl and Java: A brief examination of design.
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |