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.006001;
14use strict;
15use warnings;
16
17use vars qw(@ISA $VERSION $CLASS $STRICT $LAX *declare *qv);
18
19$VERSION = '7.62';
20$VERSION =~ tr/_//d;
21$CLASS = 'version';
22
23{
24    local $SIG{'__DIE__'};
25    eval "use version";
26    if ( $@ ) { # don't have any version.pm installed
27        eval "use ExtUtils::MakeMaker::version::vpp";
28        die "$@" if ( $@ );
29        no warnings;
30        delete $INC{'version.pm'};
31        $INC{'version.pm'} = $INC{'ExtUtils/MakeMaker/version.pm'};
32        push @version::ISA, "ExtUtils::MakeMaker::version::vpp";
33        $version::VERSION = $VERSION;
34        *version::qv = \&ExtUtils::MakeMaker::version::vpp::qv;
35        *version::declare = \&ExtUtils::MakeMaker::version::vpp::declare;
36        *version::_VERSION = \&ExtUtils::MakeMaker::version::vpp::_VERSION;
37        *version::vcmp = \&ExtUtils::MakeMaker::version::vpp::vcmp;
38        *version::new = \&ExtUtils::MakeMaker::version::vpp::new;
39        if ("$]" >= 5.009000) {
40            no strict 'refs';
41            *version::stringify = \&ExtUtils::MakeMaker::version::vpp::stringify;
42            *{'version::(""'} = \&ExtUtils::MakeMaker::version::vpp::stringify;
43            *{'version::(<=>'} = \&ExtUtils::MakeMaker::version::vpp::vcmp;
44            *version::parse = \&ExtUtils::MakeMaker::version::vpp::parse;
45        }
46        require ExtUtils::MakeMaker::version::regex;
47        *version::is_lax = \&ExtUtils::MakeMaker::version::regex::is_lax;
48        *version::is_strict = \&ExtUtils::MakeMaker::version::regex::is_strict;
49        *LAX = \$ExtUtils::MakeMaker::version::regex::LAX;
50        *STRICT = \$ExtUtils::MakeMaker::version::regex::STRICT;
51    }
52    elsif ( ! version->can('is_qv') ) {
53        *version::is_qv = sub { exists $_[0]->{qv} };
54    }
55}
56
571;
58