Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

In my Bar.pm, I have use version 0.77 (); our $VERSION = version->declare('v0.0.1'); According to the version.pm docs, this is now recommended.

.../Local-Foo-Bar> perl Build.PL Checking whether your kit is complete... Looks good Checking prerequisites... Looks good Creating new 'Build' script for 'Local-Foo-Bar' version 'v0.0.1' .../Local-Foo-Bar> ./Build dist Deleting META.yml Creating META.yml Creating Local-Foo-Bar-v0.0.1 Creating Local-Foo-Bar-v0.0.1.tar.gz Deleting Local-Foo-Bar-v0.0.1

As you can see, building a distro adds a v to the version number in the distro name. Leaving it away in the declare method does not help.

I hate this v for aesthetic reasons. It also does not play well with other version comparison tools at the perimeter or outside the CPAN ecology. I suspect I'm not the only one who encountered that problem.

My questions: Has anyone asked packagers who package CPAN distros for e.g. Linux distros about this seemingly gratuitous change/new recommended practice? How do I get rid of the v in the distro name?

Replies are listed 'Best First'.
Re: v in distro name
by Khen1950fx (Canon) on Aug 01, 2009 at 13:32 UTC
    For your Bar.pm, you can eliminate the v something like this:

    package Bar; use 5.8.8; use version 0.77; our $VERSION = version->parse('0.0.1')->stringify; print $Bar::VERSION, "\n"; 1;
Re: v in distro name
by Anonymous Monk on Aug 02, 2009 at 00:01 UTC
    My questions: Has anyone asked packagers who package CPAN distros for e.g. Linux distros about this seemingly gratuitous change/new recommended practice?

    I'm not sure who those guys are, but I'm fairly certain they're not responsible :)

    How do I get rid of the v in the distro name?

    See Module::Build

    my $build = Module::Build->new( dist_name => 'Foo-Bar', dist_version => '1.04', ... );
    or see ExtUtils::MakeMaker
    WriteMakefile( DISTNAME => 'Foo-Bar', DISTVNAME => 'Foo-Bar-1.04', ... )
    With above parameters, both will create distdir Foo-Bar-1.04 and dist Foo-Bar-1.04.tar.gz