Another thing to consider, is using the Safe module (with everything turned on perhaps) to load the plugins into a certain namespace. And then use that namespace for the parts of your code you want the plugins to overwrite. That way, you can even still publish an interface, but each plugin can only see the plugin-accessible part of the namespace.
And then the plugin doesn't have to mess with PluginNamespace, that happens automatically. You can even pass things in (which is as if the plugin got them from you with export. Like a reverse export) and other crazy stuff.use Safe; my $cpt = Safe->new( 'PluginNamespace' ); $cpt->deny_only(); $cpt->rdo( PLUGINFILENAME );
I use Safe alot, but rarely for what it was intended for...
In reply to Re^3: Altering Package Subs and Running In To Problems
by Aighearach
in thread Altering Package Subs and Running In To Problems
by Bovine
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |