Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re: Beginner OOP style question

by ixo111 (Acolyte)
on Mar 02, 2002 at 16:35 UTC ( [id://148832]=note: print w/replies, xml ) Need Help??

in reply to Beginner OOP style question

You might try to export a generic 'search' method, assuming you don't have to create a new database handle for each object .. possibly have the search method retrieve a list which can then be passed to a 'load' method which would instantiate SomeObject for each item so loaded? When your code tries to do two distinct things (dealing with your objects and dealing with moving those objects in/out of secondary storage), that is the place to design a dividing line, or use/author another module altogether.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://148832]
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2024-06-20 00:18 GMT
Find Nodes?
    Voting Booth?

    No recent polls found

    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.