Skip Menu |

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

Report information
The Basics
Id: 51877
Status: resolved
Priority: 0/
Queue: ExtUtils-MakeMaker

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

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



Subject: Needs support for new 'package NAME VERSION' syntax in blead
Blead perl introduces new syntax for setting $VERSION as part of the package declaration: package Foo 1.23; This allows for a direct parse without needing to eval the line. I have created a github branch with the necessary changes. repo: git://github.com/dagolden/extutils-makemaker.git branch: package-name-version -- David
Thanks, I merged in your branch and threw some more tests and docs on top of it. There's an open issue about what to do about this: package Foo 1.23; our $VERSION = 2.34; parse_version() will say 1.23 on the "use the first thing" principle. 5.11.2 will say 2.34 since there's nothing saying you can't assign to $VERSION. I'm tempted to leave it as is, parse_version() has always taken the "don't do that" stance to altering $VERSION. But maybe Perl should make $VERSION readonly if its been declared via package? If you really want to you can always turn it off.
Subject: Re: [rt.cpan.org #51877] Needs support for new 'package NAME VERSION' syntax in blead
Date: Fri, 4 Dec 2009 22:40:22 -0500
To: bug-ExtUtils-MakeMaker [...] rt.cpan.org
From: David Golden <dagolden [...] cpan.org>
On Fri, Dec 4, 2009 at 7:24 PM, Michael G Schwern via RT <bug-ExtUtils-MakeMaker@rt.cpan.org> wrote: Show quoted text
> There's an open issue about what to do about this: > >    package Foo 1.23; >    our $VERSION = 2.34; > > parse_version() will say 1.23 on the "use the first thing" principle. > 5.11.2 will say 2.34 since there's nothing saying you can't assign to > $VERSION. > > I'm tempted to leave it as is, parse_version() has always taken the > "don't do that" stance to altering $VERSION.  But maybe Perl should make > $VERSION readonly if its been declared via package?  If you really want > to you can always turn it off.
I think at this point, we can leave it as is. It's conceptually no different than: package Foo; our $VERSION = 1.23; $VERSION = 2.34; People have always been able to do stupid things to $VERSION if they want to. Making $VERSION readonly now is probably too risky when Perl 5.11 is in a freeze period. In Perl 5.13, we can have 'package NAME VERSION' set it readonly and we'll have a year to sort out any issues. -- David
Ticket appears to have been reopened. Marking as resolved again.