in reply to Object oriented Perl and Java: A brief examination of design.
# 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, |
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Object oriented Perl and Java: A brief examination of design.
by hippo (Archbishop) on Jan 29, 2014 at 09:49 UTC | |
by Athanasius (Archbishop) on Jan 29, 2014 at 13:20 UTC | |
by stonecolddevin (Parson) on Jan 29, 2014 at 19:43 UTC | |
|
Re^2: Object oriented Perl and Java: A brief examination of design.
by Anonymous Monk on Jan 29, 2014 at 05:08 UTC | |
by Athanasius (Archbishop) on Jan 29, 2014 at 06:06 UTC | |
by Anonymous Monk on Jan 29, 2014 at 05:40 UTC |