in reply to scripts on CPAN

The CPAN dependency management system is really designed about modules, not scripts, though I'm surprised that the search system has that same problem. However, one easy option is just to add a module that describes your script. E.g.

package My::Script; $VERSION = 0.123; use strict; # keeps CPANTS happy 1; __END__ =pod describe your script here =cut

Another option is to turn your script into a module.

-xdg

Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.

Replies are listed 'Best First'.
Re^2: scripts on CPAN
by ferreira (Chaplain) on Mar 23, 2007 at 11:37 UTC

    As xdg said, the issue that CPAN distributions are all about modules is pretty recurring. For instance, that's why the easiest way to install the ack distribution (which comes with the ack script) is to say

    cpan> install App::Ack
    where App::Ack is a companion module that lives in the same distribution. Otherwise, you may take a look at the author directory with
    cpan> ls PETDANCE or cpan> ls PETDANCE/*ack*
    and hope to see something in the sea of released distributions.
    Another option is to turn your script into a module

    That amounts to a good piece of advice as it can make your code more reusable both as the script (for external users) and as a module (for fellow Perl programmers).