For example, the basic file layout is similar, the Test::Harness and Test::Simple framework has been ported to JSAN, and most modules use Makefiles to set things up.
There is a dead simple way to package non-Perl components into Perl/CPAN distributions. The components get installed in your Perl system but do not affect Perl in any other way.
It turns out that Perl's ExtUtils::MakeMaker will install *any* files that you put in the
lib/ directory, into your
Foo.Bar. First create a distribution directory called:
lib/JS/Foo/Bar.js. Put your documentation in
lib/JS/Foo/Bar.pod. Create a bare bones
lib/JS/Foo/Bar.pm Perl module so that CPAN related tools can find your stuff.
Your Makefile.PL should look something like this:
README file and dummy
test.t. CPAN module distributions should have these files.
tests. I'll write up more explicit instructions in a future release, but for now look at
JS-YAML on CPAN or any openjsan.org module as an example.
Now just run these commands:
perl Makefile.PL make make manifest make dist cpan-upload -user foo -passwd bar -mailto email@example.com JS-Foo-Bar-0.01.tar.gz
That's it. You've joined the revolution. :)
JS.pm in the
Ingy dÃ¶t Net <firstname.lastname@example.org>
Copyright (c) 2008. Ingy dÃ¶t Net.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.