r2274 - in packages/libversion-perl/trunk: . debian lib t vperl
vutil
Krzysztof Krzyzaniak
eloy at costa.debian.org
Tue Mar 7 16:15:53 UTC 2006
Author: eloy
Date: 2006-03-07 16:15:52 +0000 (Tue, 07 Mar 2006)
New Revision: 2274
Modified:
packages/libversion-perl/trunk/Build.PL
packages/libversion-perl/trunk/Changes
packages/libversion-perl/trunk/META.yml
packages/libversion-perl/trunk/README
packages/libversion-perl/trunk/debian/changelog
packages/libversion-perl/trunk/lib/version.pm
packages/libversion-perl/trunk/t/coretests.pm
packages/libversion-perl/trunk/vperl/vpp.pm
packages/libversion-perl/trunk/vutil/vxs.pm
Log:
eloy; new upstream version
Modified: packages/libversion-perl/trunk/Build.PL
===================================================================
--- packages/libversion-perl/trunk/Build.PL 2006-03-07 16:15:18 UTC (rev 2273)
+++ packages/libversion-perl/trunk/Build.PL 2006-03-07 16:15:52 UTC (rev 2274)
@@ -3,7 +3,25 @@
use Module::Build;
my $perl_only;
-my $t = Module::Build->new(
+my $class = Module::Build->subclass
+(
+ class => 'version::Builder',
+ code => q{
+ sub ACTION_dist{
+ my $self = shift;
+ $self->do_system('svk log -x | gnuify-changelog.pl > Changes');
+ $self->SUPER::ACTION_dist();
+ };
+ sub have_c_compiler{
+ my $self = shift;
+ my $have = eval {$self->SUPER::have_c_compiler};
+ $have = 0 if $@;
+ return $have;
+ };
+ },
+);
+
+my $t = $class->new(
module_name => 'version',
get_options => {
'perl_only' => { store => \$perl_only },
@@ -15,14 +33,14 @@
dist_version_from => 'lib/version.pm',
license => 'perl',
requires => {
- perl => '> 5.005, !=5.9.1, !=5.9.2',
+ perl => '> 5.005, < 5.009',
},
dynamic_config => 1,
);
mkdir $t->config_dir();
-if ( $perl_only ) { #or not $t->have_c_compiler() ) {
+if ( $perl_only or not $t->have_c_compiler() ) {
$build_arguments{module_name} = 'version::vpp';
if ( $] > 5.008001 ) {
$build_arguments{requires} = {
@@ -48,18 +66,6 @@
['lib/version/vxs.*'];
}
-my $class = Module::Build->subclass
-(
- class => 'version::Builder',
- code => q{
- sub ACTION_dist{
- my $self = shift;
- $self->do_system('svk log -x | gnuify-changelog.pl > Changes');
- $self->SUPER::ACTION_dist();
- }
- },
-);
-
my $m = $class->new(%build_arguments);
$m->create_build_script;
Modified: packages/libversion-perl/trunk/Changes
===================================================================
--- packages/libversion-perl/trunk/Changes 2006-03-07 16:15:18 UTC (rev 2273)
+++ packages/libversion-perl/trunk/Changes 2006-03-07 16:15:52 UTC (rev 2274)
@@ -1,3 +1,41 @@
+2006-02-26 John Peacock <jpeacock at cpan.org>
+
+ Release 0.57 to CPAN. Only bumps $VERSION and slightly improve Build.PL.
+
+2006-02-20 John Peacock <jpeacock at cpan.org>
+
+ Next beta release to CPAN.
+
+ * Build.PL
+ Subclass Module::Build and override have_c_compiler() with one that
+ fails without die'ing.
+
+ * README
+ lib/version.pm
+ vperl/vpp.pm
+ vutil/vxs.pm
+ $VERSION++.
+
+2006-02-20 John Peacock <jpeacock at cpan.org>
+
+ Beta release to CPAN.
+
+ * README
+ lib/version.pm
+ Bump $VERSION for new release.
+
+ * vperl/vpp.pm
+ Fully implemented UNIVERSAL::VERSION in the pure Perl module.
+ Set explicit $VERSION so that correct module gets loaded during
+ testing.
+
+ * vutil/vxs.pm
+ Set explicit $VERSION so that correct module gets loaded during
+ testing.
+
+ * t/coretests.pm
+ Additional tests (based on bleadperl t/op/use.t).
+
2006-02-19 John Peacock <jpeacock at cpan.org>
Another workaround for incomplete testing
Modified: packages/libversion-perl/trunk/META.yml
===================================================================
--- packages/libversion-perl/trunk/META.yml 2006-03-07 16:15:18 UTC (rev 2273)
+++ packages/libversion-perl/trunk/META.yml 2006-03-07 16:15:52 UTC (rev 2274)
@@ -1,17 +1,17 @@
---
name: version
-version: 0.56
+version: 0.57
author: ~
abstract: ~
license: perl
requires:
- perl: '> 5.005, !=5.9.1, !=5.9.2'
+ perl: '> 5.005, < 5.009'
dynamic_config: 1
provides:
version:
file: lib/version.pm
- version: 0.56
+ version: 0.57
version::vxs:
file: vutil/vxs.pm
- version: 0.55
+ version: 0.57
generated_by: Module::Build version 0.2611
Modified: packages/libversion-perl/trunk/README
===================================================================
--- packages/libversion-perl/trunk/README 2006-03-07 16:15:18 UTC (rev 2273)
+++ packages/libversion-perl/trunk/README 2006-03-07 16:15:52 UTC (rev 2274)
@@ -1,4 +1,4 @@
-version 0.56
+version 0.57
==================================
Provides the same version objects as included in Perl v5.9.x (and hopefully in
@@ -9,17 +9,13 @@
in the core). If you are testing bleadperl, you will need to check out the
latest release of 5.9.x to get the changes included in 0.50.
-
-Major changes in 0.56 (was 0.55)
+Major changes in 0.57
==================================
-Nothing at all. This is the second in a series of "not very well tested
-Build.PL" changes. If you want the pure Perl implementation installed you
-must follow the instructions below; the Build.PL file will not do this by
-itself.
+Fully implemented UNIVERSAL::VERSION in the pure Perl module. Revert
+change to implementation modules so that the $VERSION testing in the main
+module loads the correct underlying module during testing. Subclass
+Module::Build so lack of compiler is not fatal.
-
-Major changes in 0.54
-==================================
This release includes an optional pure Perl implementation (in case
you don't have a C-compiler or if some reason you want your code to be
much slower). You can test it by calling the build script as
@@ -28,15 +24,6 @@
and it will install the Perl only version.
-NOTE: there is also a significant change in the behavior of the XS module.
-Versions prior to 0.54 mistakenly cloned an existing object, if new()
-was called as an object method. In other words:
-
- $v2 = $v1->new(); # formerly would assign the value of $v1 to $v2
-
-This behavior was wrong, and I apologize profusely.
-
-
Please read the POD documentation for usage/details. See the CHANGES file
for full details of all changes to the module behavior.
@@ -57,5 +44,5 @@
This module can be distributed under the same terms as Perl.
-Copyright (C) 2004,2005 John Peacock
+Copyright (C) 2004,2005,2006 John Peacock
Modified: packages/libversion-perl/trunk/debian/changelog
===================================================================
--- packages/libversion-perl/trunk/debian/changelog 2006-03-07 16:15:18 UTC (rev 2273)
+++ packages/libversion-perl/trunk/debian/changelog 2006-03-07 16:15:52 UTC (rev 2274)
@@ -1,3 +1,9 @@
+libversion-perl (0.57-1) unstable; urgency=low
+
+ * New upstream release
+
+ -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Tue, 7 Mar 2006 17:15:01 +0100
+
libversion-perl (0.56-1) unstable; urgency=low
* New upstream release
Modified: packages/libversion-perl/trunk/lib/version.pm
===================================================================
--- packages/libversion-perl/trunk/lib/version.pm 2006-03-07 16:15:18 UTC (rev 2273)
+++ packages/libversion-perl/trunk/lib/version.pm 2006-03-07 16:15:52 UTC (rev 2274)
@@ -11,7 +11,7 @@
@EXPORT = qw(qv);
-$VERSION = 0.56;
+$VERSION = 0.57;
$CLASS = 'version';
Modified: packages/libversion-perl/trunk/t/coretests.pm
===================================================================
--- packages/libversion-perl/trunk/t/coretests.pm 2006-03-07 16:15:18 UTC (rev 2273)
+++ packages/libversion-perl/trunk/t/coretests.pm 2006-03-07 16:15:52 UTC (rev 2274)
@@ -241,7 +241,8 @@
unlike($@, qr/Test::More version $version/,
'Replacement eval works with exact version');
- $version = $Test::More::VERSION+0.01; # this should fail even with old UNIVERSAL::VERSION
+ # this should fail even with old UNIVERSAL::VERSION
+ $version = $Test::More::VERSION+0.01;
eval "use Test::More $version";
like($@, qr/Test::More version $version/,
'Replacement eval works with incremented version');
@@ -256,7 +257,27 @@
eval "use Test::More $version";
like($@, qr/Test::More version $version/,
'Replacement eval works with incremented digit');
+
+ { # dummy up some variously broken modules for testing
+ open F, ">xxx.pm" or die "Cannot open xxx.pm: $!\n";
+ print F "1;\n";
+ close F;
+ eval "use lib '.'; use xxx 3;";
+ like ($@, qr/^xxx defines neither package nor VERSION/,
+ 'Replacement handles modules without package or VERSION');
+ unlink 'xxx.pm';
+ }
+ { # dummy up some variously broken modules for testing
+ open F, ">yyy.pm" or die "Cannot open yyy.pm: $!\n";
+ print F "package yyy;\n#look ma no VERSION\n1;\n";
+ close F;
+ eval "use lib '.'; use yyy 3;";
+ like ($@, qr/^yyy does not define \$yyy::VERSION/,
+ 'Replacement handles modules without VERSION');
+ unlink 'yyy.pm';
+ }
+
SKIP: {
skip 'Cannot test v-strings with Perl < 5.8.1', 4
if $] < 5.008_001;
@@ -293,4 +314,7 @@
}
+package known::module;
+# Look Ma! No $VERSION;
+
1;
Modified: packages/libversion-perl/trunk/vperl/vpp.pm
===================================================================
--- packages/libversion-perl/trunk/vperl/vpp.pm 2006-03-07 16:15:18 UTC (rev 2273)
+++ packages/libversion-perl/trunk/vperl/vpp.pm 2006-03-07 16:15:52 UTC (rev 2274)
@@ -5,7 +5,7 @@
use Exporter ();
use Scalar::Util qw(isvstring reftype);
use vars qw ($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS @REGEXS);
-$VERSION = $version::VERSION;
+$VERSION = 0.57;
@ISA = qw (Exporter);
#Give a hoot don't pollute, do not export more than needed by default
@EXPORT = qw (qv);
@@ -19,8 +19,6 @@
(?:(\d+)\.?){1,}
/x;
-local $^W; # shut up the 'redefined' warning for UNIVERSAL::VERSION
-
use overload (
'+0' => \&numify,
'""' => \&stringify,
@@ -387,4 +385,37 @@
}
}
+local $^W; # shut up the 'redefined' warning for UNIVERSAL::VERSION
+no warnings 'redefine';
+
+package UNIVERSAL;
+
+sub VERSION {
+ my ($obj, $req) = @_;
+ my $class = ref($obj) || $obj;
+ no strict 'refs';
+ eval "require $class" unless %{"$class\::"}; # already existing
+ die "$class defines neither package nor VERSION--version check failed"
+ if $@ or not %{"$class\::"};
+
+ my $version = eval "\$$class\::VERSION";
+ die "$class does not define \$$class\::VERSION--version check failed"
+ unless defined $version;
+
+ $version = version::vpp->new($version);
+
+ if ( defined $req ) {
+ $req = version::vpp->new($req);
+
+ die sprintf ("%s version %s (%s) required--".
+ "this is only version %s (%s)", $class,
+ $req->numify, $req->normal,
+ $version->numify, $version->normal)
+ if ( $req > $version );
+ }
+
+ return $version->numify;
+}
+
+
1; #this line is important and will help the module return a true value
Modified: packages/libversion-perl/trunk/vutil/vxs.pm
===================================================================
--- packages/libversion-perl/trunk/vutil/vxs.pm 2006-03-07 16:15:18 UTC (rev 2273)
+++ packages/libversion-perl/trunk/vutil/vxs.pm 2006-03-07 16:15:52 UTC (rev 2274)
@@ -12,7 +12,7 @@
@EXPORT = qw(qv);
-$VERSION = $version::VERSION;
+$VERSION = 0.57;
$CLASS = 'version::vxs';
More information about the Pkg-perl-cvs-commits
mailing list