in reply to How do plugins work?

You'll be moving stuff anyway. If you don't want to move the stuff you want to reuse into a module, how about moving the stuff you don't want to reuse into seperate modules and loading them from the script?

If you want specifics, please elaborate.

update...

here's a very simple example:

#!perl # process input & args... my $plugin_name = 'Some::Module'; eval "use $plugin_name;" or die "can't load module"; my $output = $plugin_name->process($formatted_input); # format output print $formatted_output;
and this in Some/Module.pm:
package Some::Module; sub process { my ($package,$formatted_input) = @_; # do stuff; return $output; }