Ken Williams wrote:
> There's no dependency from M::B to Scalar::Util. I grepped the M::B
> source and tests for 'Scalar' and found nothing, maybe it's a grandchild
> dependency or something?
There *was* a dependency when the included version.pm module use Scalar::Util.
The current M::B and version.pm don't have that dependency any longer. Speaking
of which, attached is a small tweakage to bring up M::B to version-0.71...
John
--
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
=== lib/Module/Build/Version.pm
==================================================================
--- lib/Module/Build/Version.pm (revision 2030)
+++ lib/Module/Build/Version.pm (local)
@@ -94,7 +94,7 @@
use locale;
use vars qw ($VERSION @ISA @REGEXS);
-$VERSION = "0.70";
+$VERSION = 0.71;
push @REGEXS, qr/
^v? # optional leading 'v'
@@ -499,6 +499,12 @@
return version->new($value); # always use base class
}
+sub is_qv {
+ my ($self) = @_;
+ return (exists $self->{qv});
+}
+
+
sub _verify {
my ($self) = @_;
if ( ref($self)
@@ -568,12 +574,20 @@
if ( $req > $version ) {
require Carp;
- Carp::croak(
- sprintf ("%s version %s (%s) required--".
- "this is only version %s (%s)", $class,
- $req->numify, $req->normal,
- $version->numify, $version->normal)
- );
+ if ( $req->is_qv ) {
+ Carp::croak(
+ sprintf ("%s version %s required--".
+ "this is only version %s", $class,
+ $req->normal, $version->normal)
+ );
+ }
+ else {
+ Carp::croak(
+ sprintf ("%s version %s required--".
+ "this is only version %s", $class,
+ $req->numify, $version->numify)
+ );
+ }
}
}