Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
Syntactic Confectionery Delight
 
PerlMonks  

Re: Recommendations for adding plugin/addon capability to a program

by boftx (Hermit)
on Dec 31, 2013 at 00:09 UTC ( #1068786=note: print w/ replies, xml ) Need Help??


in reply to Recommendations for adding plugin/addon capability to a program

Given the additional information I would agree that Module::Pluggable would be a viable way to go. You can scan in the plugins you have and build a hash of the kinds of file you can handle (with module names as values) and then call as needed for each file type as you encounter them. Each module could have a standard method that would "register" itself in the hash that could be called as part of the M::P search/init routine.

That is basically what I did for my primary use case. I had to take in various CSV and XML files and call the correct module to transform them into my internal format for further processing.

It helps to remember that the primary goal is to drain the swamp even when you are hip-deep in alligators.


Comment on Re: Recommendations for adding plugin/addon capability to a program

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (15)
As of 2014-04-16 14:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (427 votes), past polls