Skip Menu |
 

This queue is for tickets about the Module-Build CPAN distribution.

Report information
The Basics
Id: 3743
Status: resolved
Priority: 0/
Queue: Module-Build

People
Owner: Nobody in particular
Requestors: ilya [...] martynov.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.20
Fixed in: (no value)

Attachments


Subject: Version numbers in META.yml
Hi, I'm not sure if it a bug in Module::Build or in YAML. Anyway the end result is that when reading data back from META.yml ending zeros in version numbers are being lost. I.e. version number 0.10 becomes 0.1. Example Module::Build distro is attached. Autogenerated META.yml contains --- #YAML:1.0 name: Foo version: 0.10 license: perl distribution_type: module requires: {} recommends: {} build_requires: {} conflicts: {} provides: Foo: file: lib/Foo.pm version: 0.10 generated_by: Module::Build version 0.20 When reading version number from this file we see 0.1 instead of 0.10: bash-2.05b$ perl -MYAML -e 'print YAML::LoadFile("META.yml")->{version}, "\n"' 0.1 The problem is that when META.yml is read version number is treated as a Perl number not as a Perl string. As I've already said I'm not sure which module to blame. Either Module::Build should generate slighly different META.yml - use "version: '0.10'" instead of "version: 0.10" which causes version number to be read as a Perl string instead of a Perl number or YAML should not read "version: 0.10" as a Perl number.
Download Foo-0.10.tar.gz
application/gzip 579b

Message body not shown because it is not plain text.

Date: Mon, 8 Sep 2003 09:20:33 -0500
Subject: Re: [cpan #3743] Version numbers in META.yml
From: Ken Williams <ken [...] mathforum.org>
To: bug-Module-Build [...] rt.cpan.org
RT-Send-Cc:
Download (untitled) / with headers
text/plain 460b
Looks like this is a bug in YAML. I tried the following in the YAML shell: ysh > { foo => 0.10, bar => '0.10' } --- #YAML:1.0 bar: 0.10 foo: 0.1 That shows something somewhat proper, but when YAML reads it back in, it gets: ysh > --- Show quoted text
yaml> bar: 0.10 yaml> foo: 0.1 yaml> ...
$VAR1 = { 'foo' => '0.1', 'bar' => '0.1' }; So you're right, the trailing zero has been cut off. Let's see if we can work this out with the YAML folks. -Ken
Download (untitled) / with headers
text/plain 212b
Okay - so this is a bug in reading the YAML back in. Since Module::Build never actually reads YAML back in, I'll classify this as a bug in YAML rather than in Module::Build, and declare the bug closed. -Ken


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.