From 16885730cc71c1a2c94594189bbcb41ff1522b16 Mon Sep 17 00:00:00 2001 From: John Peacock Date: Sun, 29 Dec 2013 11:49:43 -0500 Subject: [PATCH] Integrate CPAN release of version.pm 0.9905 When adding the CPAN-distributed files for version.pm, it is necessary to delete an entire block out of lib/version.pm, since that code is only necessary with the CPAN release. Within core Perl, there is no version::vxs implementation class any more. --- MANIFEST | 6 +++++- cpan/version/lib/version.pm | 46 ++++----------------------------------------- 2 files changed, 9 insertions(+), 43 deletions(-) diff --git a/MANIFEST b/MANIFEST index 5299ccd..9acf168 100644 --- a/MANIFEST +++ b/MANIFEST @@ -2742,7 +2742,10 @@ cpan/Unicode-Normalize/t/tie.t Unicode::Normalize cpan/version/lib/version/Internals.pod Description of the internals of version objects cpan/version/lib/version.pm Support for version objects cpan/version/lib/version.pod Documentation of the version module -cpan/version/t/01base.t Tests for version objects` +cpan/version/lib/version/regex.pm Regex for matching version objects +cpan/version/lib/version/vpp.pm Pure Perl implementation of XS code +cpan/version/t/00impl-pp.t Tests for version objects +cpan/version/t/01base.t Tests for version objects cpan/version/t/02derived.t Tests for version objects cpan/version/t/03require.t Tests for version objects cpan/version/t/04strict_lax.t Tests for version objects @@ -2750,6 +2753,7 @@ cpan/version/t/05sigdie.t Tests for version objects cpan/version/t/06noop.t Tests for version objects cpan/version/t/07locale.t Tests for version objects cpan/version/t/08_corelist.t Tests for version objects +cpan/version/t/09_list_util.t Tests for version objects cpan/version/t/coretests.pm Tests for version objects cpan/Win32API-File/buffers.h Win32API::File extension cpan/Win32API-File/cFile.h Win32API::File extension diff --git a/cpan/version/lib/version.pm b/cpan/version/lib/version.pm index 7e548a8..e6620c2 100644 --- a/cpan/version/lib/version.pm +++ b/cpan/version/lib/version.pm @@ -9,48 +9,10 @@ use vars qw(@ISA $VERSION $CLASS $STRICT $LAX *declare *qv); $VERSION = 0.9905; $CLASS = 'version'; -{ - local $SIG{'__DIE__'}; - eval "use version::vxs $VERSION"; - if ( $@ ) { # don't have the XS version installed - eval "use version::vpp $VERSION"; # don't tempt fate - die "$@" if ( $@ ); - push @ISA, "version::vpp"; - local $^W; - *version::qv = \&version::vpp::qv; - *version::declare = \&version::vpp::declare; - *version::_VERSION = \&version::vpp::_VERSION; - *version::vcmp = \&version::vpp::vcmp; - *version::new = \&version::vpp::new; - if ($] >= 5.009000) { - no strict 'refs'; - *version::stringify = \&version::vpp::stringify; - *{'version::(""'} = \&version::vpp::stringify; - *{'version::(<=>'} = \&version::vpp::vcmp; - *version::parse = \&version::vpp::parse; - } - *version::is_strict = \&version::vpp::is_strict; - *version::is_lax = \&version::vpp::is_lax; - } - else { # use XS module - push @ISA, "version::vxs"; - local $^W; - *version::declare = \&version::vxs::declare; - *version::qv = \&version::vxs::qv; - *version::_VERSION = \&version::vxs::_VERSION; - *version::vcmp = \&version::vxs::VCMP; - *version::new = \&version::vxs::new; - if ($] >= 5.009000) { - no strict 'refs'; - *version::stringify = \&version::vxs::stringify; - *{'version::(""'} = \&version::vxs::stringify; - *{'version::(<=>'} = \&version::vxs::VCMP; - *version::parse = \&version::vxs::parse; - } - *version::is_strict = \&version::vxs::is_strict; - *version::is_lax = \&version::vxs::is_lax; - } -} +# avoid using Exporter +use version::regex; +*version::is_lax = \&version::regex::is_lax; +*version::is_strict = \&version::regex::is_strict; sub import { no strict 'refs'; -- 1.8.3.1