Making a distribution with a command line thingy in it

Jan Henning Thorsen jhthorsen at
Fri Oct 15 04:37:41 PDT 2010

If you're using Module::Install, you need to add

 install_script glob('bin/*');

That will install every script found in the bin/ directory to the system's
default binary location. Not sure where this is on windows, but in linux
(ubuntu/debian/++) it's /usr/local/bin

Example Makefile.PL:

use inc::Module::Install;

name q(My-Module);
all_from q(lib/My/;

requires q(Moose) => 1.0;
test_requires q(Test::More) => 0.9;

bugtracker q(;
homepage q(;
repository q(git://;

install_script q(bin/my-script);


PS: ...and if you're not using Module::Install, you need to use it ;-)

On Thu, Oct 14, 2010 at 4:39 PM, Benjamin Martin <
benjamin.martin at> wrote:

> Hello MK Mongers,
> Twas a good tech meet the other day, enjoyed the talks alot .. so cheers to
> all that spoke :)
> I was just wondering if anyone knew of a good source of information about
> building a distribution?... the reason I ask is because I was trying to find
> information on how to build into your package a command line script??
> I dont have any problems packaging the modules... especially now I have
> started using Dist::Zilla, but I can't seem to find a definative "this is
> how you include and distribute a script with your package" .. type  page??
> :)
> I have had a look in some dists that I know include a command line script
> 'cpanm', 'dzil', etc. they seem to achieve it in different ways.
> cheers,
> -Ben
> _______________________________________________
> MiltonKeynes-pm mailing list
> MiltonKeynes-pm at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the MiltonKeynes-pm mailing list