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

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

Thread Previous | Thread Next
From:
chromatic
Date:
November 30, 2009 21:09
Subject:
Re: [perl #70866] use/package with "numeric literal" VERSIONs
Message ID:
200911302108.56646.chromatic@wgz.org
On Monday 30 November 2009 at 20:45, Aristotle Pagaltzis wrote:

> * chromatic <chromatic@wgz.org> [2009-12-01 05:00]:

> > +1 to giving regexps which document the syntax, but minus
> > several to encouraging people to copy and paste them. Here's
> > a nice chance to reduce fragmentation of syntax; let's reduce
> > fragmentation of implementation as well.
 
> So what do you propose instead? Exposing the scan_version routine
> to pure Perl code somehow?

If the intent is to migrate to a single, consistent form for version numbers 
by 5.16, perhaps the best approach is to expose that routine somewhere like 
version.pm.

Pros: it's a core module, it will remain a core module, and it already handles 
version numbers.

Con: that feature won't be available when installing the CPAN version.pm on 
older Perls.  Then again, neither is the package VERSION syntax.

-- c

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