> -----Original Message----- > From: David Golden [mailto:[email protected]] > Sent: Sunday, September 13, 2009 3:19 PM > To: Jonas Brømsø Nielsen > Cc: [email protected]; [email protected] > Subject: Re: how to set $VERSION throughout distribution > > On Sun, Sep 13, 2009 at 7:50 AM, Jonas Brømsø Nielsen > <[email protected]> wrote: > > I learned one lesson based on feedback from a user and that was that > the > > distribution number should be reflected in the main package > identified by > > the build file an example from Workflow: > > > > dist_name => 'Workflow', > > dist_version_from => 'lib/Workflow.pm', > > That's a great point. I wrote a short article defining what I call a > "well-formed distribution" -- where the distribution name is the same > as a module name (with appropriate :: mangling) and the distribution > version is the same as the $VERSION of the package of the same name. > > http://www.dagolden.com/index.php/308/packages-modules-and- > distributions/ > > Personally, I'm of the school of setting all $VERSION the same so that > they clearly indicate which *distribution* they came from. > > While I don't use it personally (I have my own tools/workflow), the > "perl-reversion" script in Perl-Version makes this easy. > Unfortunately, it's in the "examples" folder, so it isn't installed by > default.
I too have a hand crafted code to change the versions. It's not such a parser and will be broken under other people's code probably, but works under my code :) Here is what I do to build distros: I have a builder builder program that first asks me which module to build and then copies the main distro files into a temp dir and injects a M::B subclass into that directory then starts to build the distro and the subclass then updates versions, do some other stuff etc. Keeping the builder seperate (repo) from the actual module code seems like a more clean path to me. > http://cpansearch.perl.org/src/ANDYA/Perl-Version-1.009/examples/perl- > reversion > > -- David
