Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Registering Subclass Modules via Plugin

by philcrow (Priest)
on Nov 14, 2007 at 19:12 UTC ( #650832=note: print w/replies, xml ) Need Help??


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.

Phil

The Gantry Web Framework Book is now available.
  • Comment on Re: Registering Subclass Modules via Plugin

Replies are listed 'Best First'.
Re^2: Registering Subclass Modules via Plugin
by 2xlp (Sexton) on Nov 14, 2007 at 20:11 UTC
    Thanks Phil- thats exactly what I want to be doing, and an assumption that I'm 100% ok with making.

    I just went though Tentmaker, and pulled some ideas. Unfortunately you're using File::Find so I can't do the same-thing (i wish though!). This is for an app running under mod_perl, and File::Find is a PITA when it comes to memory on that platform.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://650832]
help
Chatterbox?
[1nickt]: Corion this is an android phone? If so, are you encountering problems with recent upgrades? Lately my phone dies suddenly quite often, seemingly coredumps caused by interaction of two actions, eg phone playing a sound and user swiping simultaneously :-/
[Corion]: 1nickt: Yeah, it's Android, but it's CM 11, so fairly old. I'm looking for a newer (china) phone, but I think I'll wait until Oreo ROMs get out for them
[Corion]: Otherwise, the Vernee Mars looks tempting
[Corion]: ... but alas, no Oreo support in sight yet, and I prefer to flash a stock Android over the custom ROMs, and Oreo promises to make the userland more maintainable.
[LanX]: Corion: shouldn't pmdev have permission to view code of nodelets?
[1nickt]: And of course everything is "unlocked" in EU, right?
[1nickt]: I think there are far more choices than in the US
LanX You don't have access to  Function Nodelet.

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2017-11-18 15:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (277 votes). Check out past polls.

    Notices?