Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re: Philosophies of Objects

by hv (Parson)
on May 24, 2006 at 10:37 UTC ( #551325=note: print w/replies, xml ) Need Help??

in reply to Philosophies of Objects

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,


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://551325]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2018-06-23 22:35 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (126 votes). Check out past polls.