Making a distribution with a command line thingy in it
Jan Henning Thorsen
jhthorsen at cpan.org
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/Module.pm);
requires q(Moose) => 1.0;
test_requires q(Test::More) => 0.9;
bugtracker q(http://rt.cpan.org/NoAuth/Bugs.html?Dist=My-Module);
homepage q(http://jhthorsen.github.com/my-module);
repository q(git://github.com/jhthorsen/my-module.git);
install_script q(bin/my-script);
auto_install;
WriteAll;
#----------------------------------------------------
Regards,
batman
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 ims-evolve.com> 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 pm.org
> http://mail.pm.org/mailman/listinfo/miltonkeynes-pm
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/miltonkeynes-pm/attachments/20101015/48769a06/attachment.html>
More information about the MiltonKeynes-pm
mailing list