r21707 - in /branches/upstream/libversion-perl/current: Build.PL Changes META.yml Makefile.PL README lib/version.pm lib/version.pod vperl/vpp.pm vutil/lib/version/vxs.pm
eloy at users.alioth.debian.org
eloy at users.alioth.debian.org
Mon Jun 16 08:59:13 UTC 2008
Author: eloy
Date: Mon Jun 16 08:59:12 2008
New Revision: 21707
URL: http://svn.debian.org/wsvn/?sc=1&rev=21707
Log:
[svn-upgrade] Integrating new upstream version, libversion-perl (0.7501)
Modified:
branches/upstream/libversion-perl/current/Build.PL
branches/upstream/libversion-perl/current/Changes
branches/upstream/libversion-perl/current/META.yml
branches/upstream/libversion-perl/current/Makefile.PL
branches/upstream/libversion-perl/current/README
branches/upstream/libversion-perl/current/lib/version.pm
branches/upstream/libversion-perl/current/lib/version.pod
branches/upstream/libversion-perl/current/vperl/vpp.pm
branches/upstream/libversion-perl/current/vutil/lib/version/vxs.pm
Modified: branches/upstream/libversion-perl/current/Build.PL
URL: http://svn.debian.org/wsvn/branches/upstream/libversion-perl/current/Build.PL?rev=21707&op=diff
==============================================================================
--- branches/upstream/libversion-perl/current/Build.PL (original)
+++ branches/upstream/libversion-perl/current/Build.PL Mon Jun 16 08:59:12 2008
@@ -7,12 +7,12 @@
(
# 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 ACTION_dist{
+ my $self = shift;
+ $self->do_system('svk log -x | gnuify-changelog.pl > Changes');
+ $self->SUPER::ACTION_dist();
};
- sub have_c_compiler{
+ sub have_c_compiler{
my $self = shift;
my $have = eval {$self->SUPER::have_c_compiler};
$have = 0 if $@;
@@ -33,45 +33,46 @@
dist_version_from => 'lib/version.pm',
license => 'perl',
requires => {
- perl => '> 5.005, < 5.009',
+ perl => '> 5.005',
},
dynamic_config => 1,
);
mkdir($t->config_dir(),0777);
-if ( $] < 5.005_04 ) {
- # Cannot support 5.005_03 with the XS code
- $perl_only = 1;
-}
-
-if ( $perl_only or not $t->have_c_compiler() ) {
- $build_arguments{module_name} = 'version::vpp';
- $build_arguments{pm_files} = {
- './lib/version.pm' => './lib/version.pm',
- './vperl/vpp.pm' => './lib/version/vpp.pm',
- };
-}
-else {
- $build_arguments{c_source} = './vutil';
- $build_arguments{module_name} = 'version::vxs';
- $build_arguments{pm_files} = {
- './lib/version.pm' => './lib/version.pm',
- './vutil/lib/version/vxs.pm' => './lib/version/vxs.pm'
- };
- $build_arguments{xs_files} = {
- './vutil/vxs.xs' => './lib/version/vxs.xs'
- };
- $build_arguments{add_to_cleanup} =
- ['lib/version/vxs.*'];
-}
-
-if ( $] >= 5.009 ) { # already included in bleadperl
+if ( $] > 5.009001 ) { # already included in bleadperl
$build_arguments{c_source} = '';
- $build_arguments{pm_files} = {};
+ $build_arguments{pm_files} = {'./lib/version.pm' => './lib/version.pm'};
$build_arguments{xs_files} = {};
$build_arguments{add_to_cleanup} = [];
$build_arguments{manpages} = {};
+ $build_arguments{installdirs} = 'core';
+}
+else {
+ if ( $] < 5.005_04 ) {
+ # Cannot support 5.005_03 with the XS code
+ $perl_only = 1;
+ }
+ if ( $perl_only or not $t->have_c_compiler() ) {
+ $build_arguments{module_name} = 'version::vpp';
+ $build_arguments{pm_files} = {
+ './lib/version.pm' => './lib/version.pm',
+ './vperl/vpp.pm' => './lib/version/vpp.pm',
+ };
+ }
+ else {
+ $build_arguments{c_source} = './vutil';
+ $build_arguments{module_name} = 'version::vxs';
+ $build_arguments{pm_files} = {
+ './lib/version.pm' => './lib/version.pm',
+ './vutil/lib/version/vxs.pm' => './lib/version/vxs.pm'
+ };
+ $build_arguments{xs_files} = {
+ './vutil/vxs.xs' => './lib/version/vxs.xs'
+ };
+ $build_arguments{add_to_cleanup} =
+ ['lib/version/vxs.*'];
+ }
}
my $m = $class->new(%build_arguments);
Modified: branches/upstream/libversion-perl/current/Changes
URL: http://svn.debian.org/wsvn/branches/upstream/libversion-perl/current/Changes?rev=21707&op=diff
==============================================================================
--- branches/upstream/libversion-perl/current/Changes (original)
+++ branches/upstream/libversion-perl/current/Changes Mon Jun 16 08:59:12 2008
@@ -1,3 +1,20 @@
+2008-06-14 John Peacock <jpeacock at cpan.org>
+
+ Interim release to correctly install under Perl v5.10.0.
+
+2008-06-07 John Peacock <jpeacock at cpan.org>
+
+ Forgot to bump the $VERSION. Go figure.
+
+2008-06-07 John Peacock <jpeacock at cpan.org>
+
+ Improve POD to clarify usage and prevent confusion.
+
+2008-04-01 John Peacock <jpeacock at cpan.org>
+
+ Optionally use the more efficient XSLoader instead of DynaLoader.
+ Resolves http://rt.cpan.org//Ticket/Display.html?id=34590
+
2007-10-24 John Peacock <jpeacock at cpan.org>
Data::Dumper is sometimes too clever for its (and our) own good.
Modified: branches/upstream/libversion-perl/current/META.yml
URL: http://svn.debian.org/wsvn/branches/upstream/libversion-perl/current/META.yml?rev=21707&op=diff
==============================================================================
--- branches/upstream/libversion-perl/current/META.yml (original)
+++ branches/upstream/libversion-perl/current/META.yml Mon Jun 16 08:59:12 2008
@@ -1,6 +1,6 @@
---
name: version
-version: 0.74
+version: 0.7501
author:
- 'John Peacock E<lt>jpeacock at cpan.orgE<gt>'
abstract: Perl extension for Version Objects
@@ -8,15 +8,15 @@
resources:
license: http://dev.perl.org/licenses/
requires:
- perl: '> 5.005, < 5.009'
+ perl: '> 5.005'
dynamic_config: 1
provides:
version:
file: lib/version.pm
- version: 0.74
+ version: 0.7501
version::vxs:
file: vutil/lib/version/vxs.pm
- version: 0.74
+ version: 0.7501
generated_by: Module::Build version 0.2808
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.2.html
Modified: branches/upstream/libversion-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/branches/upstream/libversion-perl/current/Makefile.PL?rev=21707&op=diff
==============================================================================
--- branches/upstream/libversion-perl/current/Makefile.PL (original)
+++ branches/upstream/libversion-perl/current/Makefile.PL Mon Jun 16 08:59:12 2008
@@ -45,6 +45,10 @@
AUTHOR => 'John Peacock <jpeacock at cpan.org>') :
()
),
+ ( $] >= 5.009001 ?
+ ( INSTALLDIRS => 'perl' ) :
+ ()
+ ),
PM =>
{'lib/version.pm' => '$(INST_LIBDIR)/version.pm',
'lib/version.pod' => '$(INST_LIBDIR)/version.pod'},
@@ -65,9 +69,7 @@
sub init
{
my $hash = $_[1];
- if ( $] >= 5.009001 ) { # included in bleadperl
- $hash->{'PM'} = {};
- $hash->{'MAN3PODS'} = {};
+ if ( $] > 5.009001 ) { # included in bleadperl
return $hash;
}
Modified: branches/upstream/libversion-perl/current/README
URL: http://svn.debian.org/wsvn/branches/upstream/libversion-perl/current/README?rev=21707&op=diff
==============================================================================
--- branches/upstream/libversion-perl/current/README (original)
+++ branches/upstream/libversion-perl/current/README Mon Jun 16 08:59:12 2008
@@ -1,45 +1,58 @@
-version 0.73
+version 0.7501
==================================
-Provides the same version objects as included in Perl v5.9.x (and in the
-v5.10.0 release). In fact, if you attempt to use this module with a version
-of Perl >= v5.9.0, this module will not do anything, since the code already
-exists in the Perl core. Note that the CPAN release cannot be installed
-with the interim 5.9.0, 5.9.1, and 5.9.2 releases (since it duplicates code
-in the core). If you are testing 5.9.x, you must check out bleadperl in
-order to get the current changes (the CPAN release has no effect in
-bleadperl).
+Provides the same version objects as included in Perl v5.10.0 release.
+In fact, if you attempt to use this module with a version of Perl >= v5.9.0,
+the CPAN release of this module will not do anything, since the code already
+exists in the Perl core.
-Major Changes in 0.73 - 2007-09-18
+All releases of version.pm prior to 0.74 are considered obsolete and should
+not be used (and have been deleted from CPAN), due to API changes leading up
+to Perl v5.10.0. If you 'use version' in your code, you are strongly urged to
+set a minimum, e.g. 'use version 0.74' (to remain compatible with Perl
+v5.10.0).
+
+NOTE: unless otherwise noted in 40 foot tall block letters, any subsequent CPAN
+release is 100% code equivalent with the core Perl v5.10.0 version.pm objects,
+and exists only to improve documentation (and/or backwards compatibility for
+Perl versions before v5.10.0). If you 'use version 0.75', you will cause
+a meanlingless upgrade for Perl v5.10.0 (it only installs the
+documentation).
+
+
+Major Changes in 0.7501 - 2008-06-14
+=====================================
+
+Installs correctly on Perl v5.10.0 (only the version.pm and
+version.pod) with both Makefile.PL and Build.PL. Unify version.pm
+with core copy for future Perl releases.
+Resolves:
+
+ http://rt.cpan.org/Ticket/Display.html?id=36598
+
+
+Major Changes in 0.75 - 2008-06-07
===================================
-Provide special handling for version numbers too large to represent as an
-ordinary integer.
+Optionally use XSLoader instead of DynaLoader for Perl 5.6.0 or better.
+Resolves:
-Major changes in 0.7203 - 2007-04-17
-=====================================
+ http://rt.cpan.org//Ticket/Display.html?id=34590
-Default stringification for numeric versions is the same string as was
-passed to version->new(), on the principal of least surprise. If you want
-a normalized numeric value, use $v->numify. Includes return value of
-replacement UNIVERSAL::VERSION as well. version->new() correctly
-duplicates version objects without a hitch.
+Improved documentation on stringification and round-trip behavior.
+Resolves:
-Major changes in 0.71 - 2007-03-18
-=====================================
+ https://rt.cpan.org/Ticket/Display.html?id=28206
-Polymorphic error messages (where possible). If the user typed
+Much more strident documentation that you should not use a release of
+version.pm earlier than 0.74 (due to incompatible API changes) and you
+should always require 0.74 (to prevent meaningless upgrades).
- use module 1.000; # error with 'module version 1.000 required'
- use module v1.0.0; # error with 'module version v1.0.0 required'
-
-Only available with Perl v5.6.0 or later (no v-strings at all pre v5.6.0).
-On earlier Perl releases, always displays the numeric style error (the
-first example above).
+Major Changes in 0.74 - 2007-10-24
+===================================
-All releases from Perl v5.6.0-v5.8.0 now fully support v-strings (which
-was already supported in 5.8.1 or better).
-
+Final release before Perl v5.10.0. API now frozen for all eternity. Fixes
+problem with Data::Dumper being too clever by half.
Please read the POD documentation for usage/details. See the CHANGES file
for full details of all changes to the module behavior.
@@ -91,5 +104,5 @@
This module can be distributed under the same terms as Perl.
-Copyright (C) 2004,2005,2006,2007 John Peacock
+Copyright (C) 2004-2008 John Peacock
Modified: branches/upstream/libversion-perl/current/lib/version.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libversion-perl/current/lib/version.pm?rev=21707&op=diff
==============================================================================
--- branches/upstream/libversion-perl/current/lib/version.pm (original)
+++ branches/upstream/libversion-perl/current/lib/version.pm Mon Jun 16 08:59:12 2008
@@ -6,9 +6,11 @@
use vars qw(@ISA $VERSION $CLASS *qv);
-$VERSION = 0.74;
+$VERSION = 0.7501;
$CLASS = 'version';
+
+return 1 if ( $] > 5.009001 ); # included in bleadperl
eval "use version::vxs $VERSION";
if ( $@ ) { # don't have the XS version installed
@@ -31,15 +33,6 @@
*{$callpkg."::qv"} =
sub {return bless version::qv(shift), $class }
unless defined(&{"$callpkg\::qv"});
-
-# if (@_) { # must have initialization on the use line
-# if ( defined $_[2] ) { # CVS style
-# $_[0] = version::qv($_[2]);
-# }
-# else {
-# $_[0] = version->new($_[1]);
-# }
-# }
}
1;
Modified: branches/upstream/libversion-perl/current/lib/version.pod
URL: http://svn.debian.org/wsvn/branches/upstream/libversion-perl/current/lib/version.pod?rev=21707&op=diff
==============================================================================
--- branches/upstream/libversion-perl/current/lib/version.pod (original)
+++ branches/upstream/libversion-perl/current/lib/version.pod Mon Jun 16 08:59:12 2008
@@ -22,8 +22,12 @@
=head1 DESCRIPTION
Overloaded version objects for all modern versions of Perl. This module
-implements all of the features of version objects which will be part
-of Perl 5.10.0.
+implements all of the features of version objects which are part
+of Perl 5.10.0. All previous releases (i.e. before 0.74) are deprecated
+and should not be used due to incompatible API changes. If you 'use
+version' in your code, you are strongly urged to set a minimum, e.g.
+
+ use version 0.74; # to remain compatible with Perl v5.10.0
=head2 BEST PRACTICES
@@ -406,6 +410,31 @@
See also L<UNIVERSAL::VERSION>, as this also returns the stringified form
when used as a class method.
+
+IMPORTANT NOTE: There is one exceptional cases shown in the above table
+where the "initializer" is not stringwise equivalent to the stringified
+representation. If you use the C<qv()> operator on a version without a
+leading 'v' B<and> with only a single decimal place, the stringified output
+will have a leading 'v', to preserve the sense. See the L<qv()> operator
+for more details.
+
+IMPORTANT NOTE 2: Attempting to bypass the normal stringification rules by
+manually applying L<numify()> and L<normal()> will sometimes yield
+surprising results:
+
+ print version->new(version->new("v1.0")->numify)->normal; # v1.0.0
+
+The reason for this is that the L<numify()> operator will turn "v1.0"
+into the equivalent string "1.000000". Forcing the outer version object
+to L<normal()> form will display the mathematically equivalent "v1.0.0".
+
+As the example in L<new()> shows, you can always create a copy of an
+existing version object with the same value by the very compact:
+
+ $v2 = $v1->new($v1);
+
+and be assured that both C<$v1> and C<$v2> will be completely equivalent,
+down to the same internal representation as well as stringification.
=back
Modified: branches/upstream/libversion-perl/current/vperl/vpp.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libversion-perl/current/vperl/vpp.pm?rev=21707&op=diff
==============================================================================
--- branches/upstream/libversion-perl/current/vperl/vpp.pm (original)
+++ branches/upstream/libversion-perl/current/vperl/vpp.pm Mon Jun 16 08:59:12 2008
@@ -3,7 +3,7 @@
use locale;
use vars qw ($VERSION @ISA @REGEXS);
-$VERSION = 0.74;
+$VERSION = 0.7501;
push @REGEXS, qr/
^v? # optional leading 'v'
Modified: branches/upstream/libversion-perl/current/vutil/lib/version/vxs.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libversion-perl/current/vutil/lib/version/vxs.pm?rev=21707&op=diff
==============================================================================
--- branches/upstream/libversion-perl/current/vutil/lib/version/vxs.pm (original)
+++ branches/upstream/libversion-perl/current/vutil/lib/version/vxs.pm Mon Jun 16 08:59:12 2008
@@ -4,17 +4,23 @@
use 5.005_03;
use strict;
-require DynaLoader;
use vars qw(@ISA $VERSION $CLASS );
- at ISA = qw(DynaLoader);
-
-$VERSION = 0.74;
+$VERSION = 0.7501;
$CLASS = 'version::vxs';
-local $^W; # shut up the 'redefined' warning for UNIVERSAL::VERSION
-bootstrap version::vxs if $] < 5.009;
+eval {
+ require XSLoader;
+ local $^W; # shut up the 'redefined' warning for UNIVERSAL::VERSION
+ XSLoader::load('version::vxs', $VERSION);
+ 1;
+} or do {
+ require DynaLoader;
+ push @ISA, 'DynaLoader';
+ local $^W; # shut up the 'redefined' warning for UNIVERSAL::VERSION
+ bootstrap version::vxs $VERSION;
+};
# Preloaded methods go here.
More information about the Pkg-perl-cvs-commits
mailing list