« /usr/local/lib/perl5/5.44.0/XSLoader.pm
↑ Summary
/usr/local/lib/perl5/5.44.0/x86_64-linux/Digest/SHA.pm »
| 1 | package version; | ||||||||||
| 2 | |||||||||||
| 3 | 7 | ▶ | use 5.006002; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 7 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 7 | ▶ | use warnings::register; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 7 | ▶ | if ($] >= 5.015) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 7 | 7 | warnings::register_categories(qw/version/); | |||||||||
| 8 | } | ||||||||||
| 9 | |||||||||||
| 10 | 7 | our $VERSION = '0.9934'; | |||||||||
| 11 | 7 | our $CLASS = 'version'; | |||||||||
| 12 | 7 | our (@ISA, $STRICT, $LAX); | |||||||||
| 13 | |||||||||||
| 14 | # avoid using Exporter | ||||||||||
| 15 | 7 | require version::regex; | |||||||||
| 16 | 7 | *version::is_lax = \&version::regex::is_lax; | |||||||||
| 17 | 7 | *version::is_strict = \&version::regex::is_strict; | |||||||||
| 18 | 7 | *LAX = \$version::regex::LAX; | |||||||||
| 19 | 7 | *LAX_DECIMAL_VERSION = \$version::regex::LAX_DECIMAL_VERSION; | |||||||||
| 20 | 7 | *LAX_DOTTED_DECIMAL_VERSION = \$version::regex::LAX_DOTTED_DECIMAL_VERSION; | |||||||||
| 21 | 7 | *STRICT = \$version::regex::STRICT; | |||||||||
| 22 | 7 | *STRICT_DECIMAL_VERSION = \$version::regex::STRICT_DECIMAL_VERSION; | |||||||||
| 23 | 7 | *STRICT_DOTTED_DECIMAL_VERSION = \$version::regex::STRICT_DOTTED_DECIMAL_VERSION; | |||||||||
| 24 | |||||||||||
| 25 | 0 | ▶ | sub import { | ||||||||
|
Subroutine
import: not called CC=13 SCAR=50.8
| |||||||||||
| 26 | 7 | ▶ | no strict 'refs'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 27 | 0 | my ($class) = shift; | |||||||||
| 28 | |||||||||||
| 29 | # Set up any derived class | ||||||||||
| 30 | 0 | ▶ | unless ($class eq $CLASS) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 31 | 0 | local $^W; | |||||||||
| 32 | 0 | *{$class.'::declare'} = \&{$CLASS.'::declare'}; | |||||||||
| 33 | 0 | *{$class.'::qv'} = \&{$CLASS.'::qv'}; | |||||||||
| 34 | } | ||||||||||
| 35 | |||||||||||
| 36 | 0 | my %args; | |||||||||
| 37 | 0 | ▶ | if (@_) { # any remaining terms are arguments | ||||||||
|
Branch: 1 branch
| |||||||||||
| 38 | 0 | map { $args{$_} = 1 } @_ | |||||||||
| 39 | } | ||||||||||
| 40 | else { # no parameters at all on use line | ||||||||||
| 41 | 0 | %args = | |||||||||
| 42 | ( | ||||||||||
| 43 | qv => 1, | ||||||||||
| 44 | 'UNIVERSAL::VERSION' => 1, | ||||||||||
| 45 | ); | ||||||||||
| 46 | } | ||||||||||
| 47 | |||||||||||
| 48 | 0 | my $callpkg = caller(); | |||||||||
| 49 | |||||||||||
| 50 | 0 | ▶ | if (exists($args{declare})) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 51 | 0 | *{$callpkg.'::declare'} = | |||||||||
| 52 | 0 | ▶ | sub {return $class->declare(shift) } | ||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||
| 53 | 0 | ▶ | unless defined(&{$callpkg.'::declare'}); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 54 | } | ||||||||||
| 55 | |||||||||||
| 56 | 0 | ▶ | if (exists($args{qv})) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 57 | 0 | *{$callpkg.'::qv'} = | |||||||||
| 58 | 0 | ▶ | sub {return $class->qv(shift) } | ||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||
| 59 | 0 | ▶ | unless defined(&{$callpkg.'::qv'}); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 60 | } | ||||||||||
| 61 | |||||||||||
| 62 | 0 | ▶ | if (exists($args{'UNIVERSAL::VERSION'})) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 63 | 0 | local $^W; | |||||||||
| 64 | *UNIVERSAL::VERSION | ||||||||||
| 65 | 0 | = \&{$CLASS.'::_VERSION'}; | |||||||||
| 66 | } | ||||||||||
| 67 | |||||||||||
| 68 | 0 | ▶ | if (exists($args{'VERSION'})) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 69 | 0 | *{$callpkg.'::VERSION'} = \&{$CLASS.'::_VERSION'}; | |||||||||
| 70 | } | ||||||||||
| 71 | |||||||||||
| 72 | 0 | ▶ | if (exists($args{'is_strict'})) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 73 | 0 | *{$callpkg.'::is_strict'} = \&{$CLASS.'::is_strict'} | |||||||||
| 74 | 0 | ▶ | unless defined(&{$callpkg.'::is_strict'}); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 75 | } | ||||||||||
| 76 | |||||||||||
| 77 | 0 | ▶ | if (exists($args{'is_lax'})) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 78 | 0 | *{$callpkg.'::is_lax'} = \&{$CLASS.'::is_lax'} | |||||||||
| 79 | 0 | ▶ | unless defined(&{$callpkg.'::is_lax'}); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 80 | } | ||||||||||
| 81 | } | ||||||||||
| 82 | |||||||||||
| 83 | |||||||||||
| 84 | 7 | 1; | |||||||||