in reply to Registering Subclass Modules via Plugin
I think a factory is for when the caller knows what they want. Your case is different.
I find out which subclasses are available by scanning all or part of the @INC path list for modules in a given namespace. I do this once, as the app starts. Note that big @INC scans can be time prohibitive. In that case, I look to see which directory my parent module lives in by checking %INC, then look there for my children, making the big assumption that they get installed to the same place as the parent. It works for Bigtop's tentmaker.
The Gantry Web Framework Book is now available.
|Replies are listed 'Best First'.|
Re^2: Registering Subclass Modules via Plugin
by 2xlp (Sexton) on Nov 14, 2007 at 20:11 UTC
In Section Seekers of Perl Wisdom