OK, I'm writing a plugin feature for scoop (dont want to get into the
details right now). Lets just say I'm taking a tarball, copying the code
into the database, and then I hope to somehow "plug it in" to scoop's
namespace.
I don't want to add these things to startup.pl (though somebody else could
write that part later). I'd rather the plugins come out of the databse -
in fact it's almost a requirement.
The code is different then boxes in that it is not wrapped in a sandbox
function. In other words the code looks like:
sub one { blah blah... }
sub two { blah blah... }
In otherwords, like a regular .pm
How do plug is into scoops's namespace?
_load_box does this:
no strict 'refs';
warn "Evaling $box_id\n" if $DEBUG;
*{"$S->{BOXES}::$box_id"} = eval( $sandbox );
warn "Error loading box $box_id: $@" if $@;
But that doesn't work for me (i want it in $S->{PLUGINS}::$plugin_name)
whereas $S->{PLUGINS} = Scoop::Plugins::site_id.
Ideas?