Hi David:
On Sat, Apr 18, 2009 at 11:29 PM, David Golden <[email protected]> wrote:
> On Sat, Apr 18, 2009 at 3:22 PM, Jonathan Yu <[email protected]> wrote:
>> Anyway, what I have decided to do is just update META.yml manually.
>
> You don't need to do that. You just need to set "dist_version" in Build.PL.
>
>> Maybe in the future I'll just stop using version.pm for my modules'
>> $VERSION altogether, and just deal with versions manually as people
>> used to do.
>
> Part (a) is a good idea. Part (b) is not. There's nothing that needs
> to be "manual" about it. Get Perl::Version and use the
> 'perl-reversion' script in examples:
>
> http://cpansearch.perl.org/src/ANDYA/Perl-Version-1.009/examples/perl-reversion
>
>> With respect to what David Golden mentioned a few posts back, I don't
>> think the version number on the files you have matters at all. They
>> just need to be different from each other. I use version.pm with
>> versions like 1.1.1, with META entries saying 1.001001. And the
>> resulting filename is something like Module-Name-1.1.1.tar.gz.
>
> The matter to the extent that you care that your META.yml corresponds
> to your distribution's unique identity. You could put anything you
> want for "name", too, and nothing will likely "break" except any tool
> that actually expects to use "name" or "version" to correspond to
> those portions of the unique identity.
>
> To put it differently, given only a META.yml file, how can you find
> the distribution it references on a CPAN mirror? It's already not
> easy, as the uploader's PAUSE ID is not contained in META.yml (though
> the "author" key might contain it). However, if "name" and "version"
> don't match the filename, it's impossible without searching every
> single archive on CPAN for a matching META.yml.
I consider 1.001001 to be equivalent to 1.1.1. So then it would be
trivial to find the name-version pair as: Some-Version-1.1.1.tar.gz,
given that you know you are looking for version 1.1.1 => 1.001001.
In META.yml, the dist module files will be listed. So you can just
find a part that says: lib/File/Name.pm and convert it to: File::Name.
Then search for that in the normal way with the CPAN shell.
Unless of course the dist isn't in lib/ anymore. Still, META will tell
you the paths to the libraries...
>
> Just because it doesn't *have* to match, doesn't mean it shouldn't.
>
>> The reason I've never released a module with a vstring-style version
>> number is because it causes test failures with Test::YAML::Meta. So it
>
> Which is a "bug" in Test::YAML::Meta that can be fixed by adding two
> characters ("v?") to the appropriate part of the regex. I already
> sent Barbie a patch for it a couple weeks ago.
>
> And I really don't think you should choose a version-style based on a
> test module.
Perhaps not. I submitted a bug report awhile ago (so I hope you
submitted yours as an addendum to the open case). I wasn't sure then
if it was a problem with Module::Build though, which does the
generation of META.yml files.
The big problem? The META-spec doesn't make a mention of version.pm.
It just says that the version number goes there. It doesn't say
whether it should be in the numified form or not. So perhaps that is
something that should be corrected for the future.
>
> -- David
>
More than anything, this is a documentation problem. I'd just like to
see this small thing added to the META spec (description).