in reply to Understanding CPAN's SCRIPT CATEGORIES

I heartily second jethro's suggestion that you create a module rather than a script on CPAN. Scripts are very poor cousins compared to modules. My First contribution to CPAN was a script and I now really wish I'd done it as a module with a small 'demo' script to call it, or used the 'run a module' trick to allow its use as both a module and a script. For example:

use warnings; use strict; package RunableModule; #... normal module stuff here sub InterestingEntryPoint { print "Hey, it works\n"; } # Execute the InterestingEntryPoint sub if being run as a script InterestingEntryPoint () unless caller (); 1;

Prints:

Hey, it works

when executed from the command line as a script.


True laziness is hard work