Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re: O-O design, aggregation of objects

by GrandFather (Sage)
on Nov 08, 2008 at 04:15 UTC ( #722355=note: print w/replies, xml ) Need Help??

in reply to O-O design, aggregation of objects

Don't reinvent wheels. There are a pile of wrapper modules for handling database management from Perl. Probably the closest to the level you want is Class::DBIx.

That of course doesn't answer the bigger question. I'd suggest that User->new () doesn't create a user without being told to, but you can pass a bunch of parameters to it among which may be -create => 1, -user => 'Wibble' and so on.

Rather than providing a bunch of getter/setter members you could provide a single setter and getter that takes a parameter specifying the property to set/get. Tk uses this technique for getting and setting options using configure and cget.

Perl reduces RSI - it saves typing

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://722355]
[choroba]: Will Glasgow have been out of the EU by that time already?
[LanX]: nope
hippo might venture to YAPC::EU.
[choroba]: YAPC::YAEC (yet another European country)
[LanX]: they are proposing an infinite transition phase now ...
[choroba]: infinite transition implies infinite money!
[LanX]: ... ehm ..."open ended" ;-)

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (8)
As of 2018-02-23 10:53 GMT
Find Nodes?
    Voting Booth?
    When it is dark outside I am happiest to see ...

    Results (301 votes). Check out past polls.