|
|
| Think about Loose Coupling | |
| PerlMonks |
Re: Iterating though an array of objectsby Athanasius (Vicar) |
| on Aug 27, 2012 at 13:16 UTC ( #989983=note: print w/ replies, xml ) | Need Help?? |
|
Hello rjhill, and welcome to the Monastery! In addition to the points noted by moritz above, the statement
references a non-existent object member “name”; this should be either
or (preferably)
The latter is better as it does not break the object’s encapsulation. I suspect this was the syntax you were looking for. Also, the statement
references an object member “version” which is not declared or initialised in package person. A final note: It is usual practice to begin the name of a user-defined package with a capital letter: package Person;. Hope that helps, Athanasius <°(((>< contra mundum
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||