Welcome to the Monastery | |
PerlMonks |
Re: OT: Design questionby Prior Nacre V (Hermit) |
on Oct 01, 2004 at 05:12 UTC ( [id://395549]=note: print w/replies, xml ) | Need Help?? |
Here's a possible way you might go about this using just two notionally singleton classes. I haven't addressed data storage and retrieval, although I suspect a DB solution will prove the better choice. (%CFG represents the config data regardless of where and how it was read.) I've also assumed $WID. This is expected to hold some unique reference to the widget being added. Consider this as the basis of an approach to a solution rather than the solution itself. I've left it very skeletal as I don't know how this might fit into any existing framework you may have.
You might also consider an Aspect-Oriented solution. There's an Aspect module on CPAN which may be useful. (I don't know anything further about this module - others might). Regards, PN5
In Section
Seekers of Perl Wisdom
|
|