|
|
|
Your skill will accomplish what the force of many cannot |
|
| PerlMonks |
Re: OOP: How to construct multiple instances of a class at onceby space_monk (Hermit) |
| on Nov 15, 2012 at 09:30 UTC ( #1003979=note: print w/ replies, xml ) | Need Help?? |
|
Using the new function in the way you have suggested is not really very OOP, as others have pointed out. An "OOP approved" way, instead of butchering new() is to have a static class method that returns the list of instances with the supplied identifiers
A Monk aims to give answers to those who have none, and to learn from those who know more.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||