Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: Philosophies of Objectsby hv (Prior) |
on May 24, 2006 at 10:37 UTC ( [id://551325]=note: print w/replies, xml ) | Need Help?? |
What I've got is a variable name, a range of values I want it to take on, and other various and dynamic statements I want to eval within that loop before calling a coderef. These are all programming concepts. To get to objects, you need to look beyond the code at the real life things you are modelling. Does the variable contain a bank balance? Then maybe you'll want classes like Customer and Account and Transaction. But if it contains a height, or an acidity, or the number of oranges that fell off that tree last month, then you'll need different classes. Or are you trying to provide a backbone of support for arbitrary variables? If so, I would probably not recommend this for a first OO project - with objects modelling concrete real world phenomena, the concrete reality is a great guide to implementation, and give you something to refer back to for every decision you make. With the very abstract the reality can (and must) guide you the same way, but it is more difficult to see the right questions to ask without having some previous experience of doing the same thing. Hope this helps, Hugo
In Section
Seekers of Perl Wisdom
|
|