Skip Menu |

This queue is for tickets about the ExtUtils-MakeMaker CPAN distribution.

Report information
The Basics
Id: 57267
Status: rejected
Priority: 0/
Queue: ExtUtils-MakeMaker

People
Owner: Nobody in particular
Requestors: byrne [...] cpan.org
Cc:
AdminCc:

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



Subject: Add support for a new VERSION_FROM format
I am the maintainer of Melody and a major contributor to Movable Type - a CMS powered by Perl. Our framework uses config.yaml files for its plugins, and I was hoping that the VERSION_FROM config attribute could be tweaked to support the following syntax for determining a version number: version: 1.0.1
Subject: Re: [rt.cpan.org #57267] Add support for a new VERSION_FROM format
Date: Thu, 06 May 2010 20:20:55 -0700
To: bug-ExtUtils-MakeMaker [...] rt.cpan.org
From: Michael G Schwern <schwern [...] pobox.com>
On 2010.5.6 2:20 PM, Byrne Reese via RT wrote: Show quoted text
> I am the maintainer of Melody and a major contributor to Movable Type - a CMS powered by > Perl. Our framework uses config.yaml files for its plugins, and I was hoping that the > VERSION_FROM config attribute could be tweaked to support the following syntax for > determining a version number: > > version: 1.0.1
Thanks for your suggestion, but I have to reject the idea. VERSION_FROM is a heuristic tuned to skim Perl code. Trying to make it also figure out if the thing in question is YAML and skim that is too far afield. It would also mess with other heuristics that rely on VERSION_FROM being Perl code. Your Makefile.PL can simply read the config.yaml file and set VERSION with it. use YAML::Any qw(LoadFile); my $Config_File = "config.yaml"; my $version = LoadFile($Config_File)->{version} || die "No version found in $Config_File"; WriteMakefile( VERSION => $version, ... ); -- 54. "Napalm sticks to kids" is *not* a motivational phrase. -- The 213 Things Skippy Is No Longer Allowed To Do In The U.S. Army http://skippyslist.com/list/
Subject: Re: [rt.cpan.org #57267] Add support for a new VERSION_FROM format
Date: Thu, 6 May 2010 20:22:57 -0700
To: bug-ExtUtils-MakeMaker [...] rt.cpan.org
From: Byrne Reese <byrne [...] majordojo.com>
Thank your for help. This is indeed what I was looking for and is sufficient to my needs. On May 6, 2010, at 8:21 PM, Michael G Schwern via RT wrote: Show quoted text
> use YAML::Any qw(LoadFile); > my $Config_File = "config.yaml"; > my $version = LoadFile($Config_File)->{version} || > die "No version found in $Config_File"; > > WriteMakefile( > VERSION => $version, > ... > );