Front page | perl.perl5.porters |
Postings from January 2007
Re: New release ?
From: John Peacock
January 7, 2007 12:58
Re: New release ?
Message ID: 45A15E79.firstname.lastname@example.org
> This is mostly because qv() isn't a builtin or the 'use version'
> statement is not on the same line.
Unfortunately, people don't understand that the entire phrase
use version; $VERSION = qv("1.2.3");
is *all* required (the 'use' on the same line and passing qv() a string). If I
had a way (short of a sourcefilter) to make qv() act like a built-in (for
tokenizer purposes), I would use it.
> However, version.pm is an XS module, so bootstrapping it is kind of
> hard. It has a pureperl compoment, but that one relies on Scalar::Util
> to be installed, which again is XS code.
I have a [possibly dodgy] way of replacing that code: check to see
1) if the Perl version is >= 5.6.0 AND
2) it doesn't contain a decimal AND
3) if the source string sprint'd with "%vd" is 3 integers.
If all three are true, we can assume we have a v-string. I already do this in
the new(), so I can just replicate that code (or rather abstract it out) and use
it in qv() as well. The trickier thing is to figure out how to do without
Scalar::Util::reftype() in _verify().
> Also, version.pm does not declare this as a prerequisite,
You're right; that was sloppy of me. If I don't strip it out completely, I'll
have to figure out how to create a conditional dependency on Scalar::Util.
> and ideally the rather mean Makefile.PL as well,
What's wrong with my Makefile.PL??? ;-) I am still highly biased towards the
Build.PL, since it is so much nicer to do more complicated things, but I'm
resigned to providing a standalone Makefile.PL for the unenlightened ones. Tell
me how the provided Makefile.PL is deficient (or provide a new one), and I'll
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4501 Forbes Blvd
Lanham, MD 20706