cosmicperl has asked for the wisdom of the Perl Monks concerning the following question:
Hi All,
I've finally got the first version of my module ready and working. Albeit only in version 0.05, and distinctly lacking in features, it works all the same!
I've got my PAUSE account setup, and have applied for the namespace. Now I just need to package the .pm file appropriately. At the moment I just have the working .pm file. Nothing else. It includes =head data, etc. But that's all I have. It doesn't use any C or XS. I know I need a README file, etc before I gzip it up and upload it.
Could someone please direct me to a good guide on packaging this for CPAN, so that I get it right and don't make any mistakes.
Lyle Hopkins
Update... I'd also like to ensure that this module is capable of being automatically included in ActiveStates ppm repository.
UPDATE: Thanks to all the replies. They have certainly put me on the right track, should have the module uploaded shortly.
Re: Finally a first version of my Module! Questions...
by Joost (Canon) on Sep 16, 2007 at 16:19 UTC
|
You need a bit more than just the .pm and README files to create a CPAN package. I think the best place to start is to read perlnewmod.
It's probably easiest to create an "empty" source tree using h2xs and then copy the code from your .pm file into the template in the new tree (and fill in the documentation).
When you've done that, you can run the usual
perl Makefile.PL
make
make test
make dist
to create the distribution tarball.
Also, you don't need to register a namespace. You can if you want to, but it's not required.
| [reply] [d/l] |
|
| [reply] |
Re: Finally a first version of my Module! Questions...
by eyepopslikeamosquito (Archbishop) on Sep 16, 2007 at 21:01 UTC
|
Some PM nodes on writing modules for the CPAN:
And some external references:
Before releasing your CPAN module,
choose a module name and design an interface based on
the general references above and on your own ideas,
then post it here or on the module-authors@perl.org
mailing list, requesting feedback.
It is vital to focus on interface early because
once your module is released, any change you make
to its interface
will break your existing user's code (by contrast, anything else
can be easily fixed in later releases).
| [reply] |
Re: Finally a first version of my Module! Questions...
by lima1 (Curate) on Sep 16, 2007 at 17:01 UTC
|
| [reply] |
Re: Finally a first version of my Module! Questions...
by randyk (Parson) on Sep 16, 2007 at 19:10 UTC
|
Update... I'd also like to ensure that this module is capable of being automatically included in ActiveStates ppm repository.
ActiveState uses an automated system that will build
ppm packages and place them in their repository if the
package, and all of it's dependencies, build and test
OK against the relevant base ActivePerl distribution. So as long as
your package satisfies that, it should be automatically
added to ActiveState's repository - this might take a week
or so since it first appears on CPAN. If there's a problem with this, you can
request one to be manually made and added to the
uwinnipeg repository.
| [reply] |
Re: Finally a first version of my Module! Questions...
by glasswalk3r (Friar) on Sep 16, 2007 at 18:08 UTC
|
Update... I'd also like to ensure that this module is capable of being automatically included in ActiveStates ppm repository.
First of all you should create a PPM package. There is documentation about this included in the ActivePerl distribution (see "Using PPM").
Unfornatelly, I'm not aware about how to request a space in a PPM repository. :-(
Alceu Rodrigues de Freitas Junior
---------------------------------
"You have enemies? Good. That means you've stood up for something, sometime in your life." - Sir Winston Churchill
| [reply] |
|
I'm not aware about how to request a space in a PPM repository
In the general case, if Activestate are able to build the module, it will be made available as a PPM package, following the same namespace layout as CPAN.
On the rare occasion that the module is not available in the AS repository, Randy Kobes's unwinnipeg site usually has it available (see link elsewhere in the thread). The other repository that cover the bits and pieces left over is Trouchelle.
Basically, though, if it's pure-Perl, Activestate will carry it.
• another intruder with the mooring in the heart of the Perl
| [reply] |
|
|