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 Golden
Date:
November 30, 2009 13:52
Subject:
Re: [perl #70866] use/package with "numeric literal" VERSIONs
Message ID:
5d4beb40911301351h7ce87ea5j73792458d2e86171@mail.gmail.com
I'll summarize a conversation from IRC today.

In part, my "wishlist" is to harmonize how $VERSION is defined, how
$VERSION is statically parsed by EU::MM->parse_version and
Module::Build::ModuleInfo, how $VERSION is specified to use(), what
gets returned by UNIVERSAL::VERSION and what version->new($version)
gives.

I'd like to be able to "round-trip" a version any which way

* set it via package NAME VERSION
* statically parse it and get the same thing back
* eval "use Foo $version" and succeed
* get the same thing back from Foo->VERSION
* give it to version->new() and get back the same thing.

I have posted some sample code that shows cases that work and that fail.

http://gist.github.com/245765

-- 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