in reply to How do plugins work?

Modules are the way to do it. You have a core script which always calls the same named functions but loads one of several modules which supply the same function names, so each time you'd just change the 'use' line in your script.

The main script

#!/usr/bin/perl -w use strict; package MyPackage; use MyModule1; print testme();
MyModule1.pm
package MyPackage; sub testme { return "Test Module 1"; } 1;

just another cpan module author