1#--------------------------------------------------------------------------# 2# This is a modified copy of version.pm 0.9909, bundled exclusively for 3# use by ExtUtils::Makemaker and its dependencies to bootstrap when 4# version.pm is not available. It should not be used by ordinary modules. 5# 6# When loaded, it will try to load version.pm. If that fails, it will load 7# ExtUtils::MakeMaker::version::vpp and alias various *version functions 8# to functions in that module. It will also override UNIVERSAL::VERSION. 9#--------------------------------------------------------------------------# 10 11package ExtUtils::MakeMaker::version; 12 13use 5.006002; 14use strict; 15 16use vars qw(@ISA $VERSION $CLASS $STRICT $LAX *declare *qv); 17 18$VERSION = '7.10_01'; 19$CLASS = 'version'; 20 21{ 22 local $SIG{'__DIE__'}; 23 eval "use version"; 24 if ( $@ ) { # don't have any version.pm installed 25 eval "use ExtUtils::MakeMaker::version::vpp"; 26 die "$@" if ( $@ ); 27 local $^W; 28 delete $INC{'version.pm'}; 29 $INC{'version.pm'} = $INC{'ExtUtils/MakeMaker/version.pm'}; 30 push @version::ISA, "ExtUtils::MakeMaker::version::vpp"; 31 $version::VERSION = $VERSION; 32 *version::qv = \&ExtUtils::MakeMaker::version::vpp::qv; 33 *version::declare = \&ExtUtils::MakeMaker::version::vpp::declare; 34 *version::_VERSION = \&ExtUtils::MakeMaker::version::vpp::_VERSION; 35 *version::vcmp = \&ExtUtils::MakeMaker::version::vpp::vcmp; 36 *version::new = \&ExtUtils::MakeMaker::version::vpp::new; 37 if ($] >= 5.009000) { 38 no strict 'refs'; 39 *version::stringify = \&ExtUtils::MakeMaker::version::vpp::stringify; 40 *{'version::(""'} = \&ExtUtils::MakeMaker::version::vpp::stringify; 41 *{'version::(<=>'} = \&ExtUtils::MakeMaker::version::vpp::vcmp; 42 *version::parse = \&ExtUtils::MakeMaker::version::vpp::parse; 43 } 44 require ExtUtils::MakeMaker::version::regex; 45 *version::is_lax = \&ExtUtils::MakeMaker::version::regex::is_lax; 46 *version::is_strict = \&ExtUtils::MakeMaker::version::regex::is_strict; 47 *LAX = \$ExtUtils::MakeMaker::version::regex::LAX; 48 *STRICT = \$ExtUtils::MakeMaker::version::regex::STRICT; 49 } 50 elsif ( ! version->can('is_qv') ) { 51 *version::is_qv = sub { exists $_[0]->{qv} }; 52 } 53} 54 551; 56