develooper Front page | perl.perl5.porters | Postings from November 2009

Re: [perl #70866] use/package with "numeric literal" VERSIONs

Thread Previous | Thread Next
From:
David E. Wheeler
Date:
November 30, 2009 19:30
Subject:
Re: [perl #70866] use/package with "numeric literal" VERSIONs
Message ID:
E046FC96-C098-429A-ABA3-25DA9DC28632@kineticode.com
On Nov 30, 2009, at 7:24 PM, John Peacock wrote:

> The altered behavior would only happen if a flag was set; the default behavior would be unchanged from what it is now.  Anyone using
> 
> 	use version; our $VERSION = version->new("1.2.3");
> 
> would continue to get exactly what they asked for...

As would folks just doing

    our $VERSION = '1.2.3';

or

    use vars '$VERSION';
    $VERSION = 1.2;

?

> The old parser that I am talking about is only used for:
> 
> 	use package 1.1;
> 
> and now
> 
> 	package foo 1.2;
> 
> Nothing else uses that codepath at all.  What I am suggesting is that I make Perl_scan_version enforce the rules that David Golden (and others) have suggested and only use those limitations when called internally by those two instances listed above.

+1.

Best,

David


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About