CPAN, my first time.

It was not that difficult getting my first distribution released on CPAN. But getting rid of the rough edges meant spending time with my favourite search engine and on IRC.

My code is hosted on github and I decided to let Dist::Zilla handle most of the work associated with releasing. Oh and I already had a PAUSE account so I could start right away.

Using Dist::Zilla turned out to be easy. Just install and after following the tutorial for some minutes I took my new distribution for a first spin.

dzil test
to make sure everything works. (Btw. I finally got around to writing tests, something I have avoided for far too long.)
dzil build
so I can have a look at the final result
dzil release
publish the first development release.

After dzil uploaded your file to CPAN it will be automatically tested by the CPAN Testers. If any of the CPAN Testers cannot successfully build and test your module you can look up the test report to get a clue what went wrong.

If you think you fixed he problem increase the version and release again.

Problems I encountered:

version numbers
After changing the versioning schema at least 2 times I managed to escape the perl-version-jungle and settled for the following scheme.

0.001_001# dev release 1
0.001_002# fix bug
0.001_003# fix missing dependency
0.002000# first "stable" release
0.003_001# new feature
0.003_002# fix bug
0.004000# effectively 0.4.0

Details on versioning in Perl

I used AutoPrereqs to handle any dependencies on other CPAN modules but in the end decided to add them manually because I always had missing dependencies. (I don't want to give AutoPrereqs a bad reputation, it simply couldn't find certain modules which Catalyst automatically prefixes with the Catalyst::Plugin namespace for example.)

my Dist::Zilla config

1 Comment

Congratulations on your first CPAN module. Nice choice with dzil.

Leave a comment

About davewood

user-pic I like Toast.