NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
confused (Score:2)
If you need a child object to create a parent, and can use a singleton, just lazily initialize it. The first pass will loop around a bit, but every pass after that, you're already done.
Re:confused (Score:1)
I don't know why you have the $b in there. Does every parent object wrap a child object?
The parent merely needs to use (and then discard) the child object. To make things a little more concrete, the Parent class (not it's real name) is there to provide both a reasonable object constructor for children and AUTOLOAD object properties accessor methods. For public methods, this class has a series of methods that return DBI handles, so that DB credentials are centralized in one place.
Child classes provide
Re:confused (Score:2)
There. That sorts it out. I'd be very confused if calling
returned a Child2 instead of a Child. It doesn't make sense from an OO perspective.Reply to This
Parent