in reply to CPAN indexing fu
Anyway, I don't use META.yaml (AFAIK it gets automatically created by the cpan site). what I do is use CVS and put this in my modules:
And this in my Makefile.PLs:our $VERSION = sprintf("%d.%03d", '$Name: $' =~ /(\d+)_(\d+)/,0,0);
WriteMakefile( # ... 'VERSION_FROM' => 'Module.pm' # filename to get version from # ... );
Then when I want to make a release, I tag the tree with a version number and some optional stuff:
and run my release.sh script:> cvs tag v1_23-some-extra-info-that-gets-ignored
#!/bin/sh BUILDDIR=/tmp MODULE=my-distibution-name if [ ! -n "$1" ]; then echo "Use 'release.sh TAGNAME' to make a release"; exit 1; fi cd $BUILDDIR && rm -rf $MODULE && cvs export -r $1 $MODULE && cd $MODULE && perl Makefile.PL && make distcheck && make test && make dist && echo " +All done"
and presto! The "$Name: $" string in Module.pm will be replaced by "$Name: v1_23-some-extra-info-that-gets-ignored $" and will I have a working release tar ball in my /tmp/ directory.
By the way: the $Name: $ substitution only works if you check out the tree with the given tag name. One of the reasons for the release.sh script is that I used to forget that.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: CPAN indexing fu
by Anonymous Monk on Oct 20, 2004 at 23:33 UTC | |
by Joost (Canon) on Oct 21, 2004 at 07:40 UTC |