Currently we can get plugin registry locally into a variable, by using similar code:
But we have to call this function in every sub we want to use it. To avoid this, would be fine to load plugin Registry for current plugin, into a Global hash variable (%REG), so we will not spend time in each sub to reload the registry.
I mean something similar as we load the main globals using this code:
We can load plugin registry into a %REG global, like this:
So this is the way how I will do right now.
Alex may add a way into next release, to import the %REG global variable of plugins, into current package we use...
Waiting opinions! Any of them are welcome.
Best regards,
Webmaster33
Paid Support from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Code:
my $plugin_registry = Links::Plugins->get_plugin_registry("myplugin");I mean something similar as we load the main globals using this code:
Code:
use Links qw/$DB $IN $USER $CFG %REG/;We can load plugin registry into a %REG global, like this:
Code:
$REG{"myplugin"} = Links::Plugins->get_plugin_registry("myplugin");Alex may add a way into next release, to import the %REG global variable of plugins, into current package we use...
Waiting opinions! Any of them are welcome.
Best regards,
Webmaster33
Paid Support from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...