develooper Front page | perl.perl5.porters | Postings from January 2007

Re: New release ?

Thread Previous | Thread Next
John Peacock
January 7, 2007 12:58
Re: New release ?
Message ID: wrote:
> 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, 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[2], 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, 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
include it...


John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4501 Forbes Blvd
Suite H
Lanham, MD 20706
301-459-3366 x.5010
fax 301-429-5747

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About