Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Draft - Writng pluggable programs with perl.

by revdiablo (Prior)
on Jun 13, 2004 at 20:15 UTC ( [id://366343]=note: print w/replies, xml ) Need Help??


in reply to Draft - Writng plugable programs with perl.

This is very similar to a plugin system that I built for (wait for it...) an IRC bot. I needed to be able to unload plugins, though. So instead of using require, I just used do. This got rid of the %INC check, which is nice, but for my purposes just a hassle. I then used delete_package from Symbol (this is a core module) to remove the plugin. Also, instead of running the subroutines immediately, I store the coderef returned by can() in a dispatch table.

Obviously my plugins work a little differently due to their different purpose, but perhaps some others will find this information useful.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2024-04-19 23:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found