| Filename | /home/s1/perl5/perlbrew/perls/perl-5.22.1/lib/site_perl/5.22.1/x86_64-linux/version.pm |
| Statements | Executed 42 statements in 1.59ms |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 1 | 1 | 1 | 592µs | 795µs | version::BEGIN@11 |
| 1 | 1 | 1 | 332µs | 429µs | version::BEGIN@6 |
| 1 | 1 | 1 | 21µs | 21µs | version::BEGIN@4 |
| 1 | 1 | 1 | 8µs | 11µs | version::BEGIN@5 |
| 1 | 1 | 1 | 8µs | 19µs | version::BEGIN@33 |
| 1 | 1 | 1 | 7µs | 17µs | version::BEGIN@70 |
| 1 | 1 | 1 | 7µs | 17µs | version::BEGIN@52 |
| 0 | 0 | 0 | 0s | 0s | version::__ANON__[:102] |
| 0 | 0 | 0 | 0s | 0s | version::__ANON__[:96] |
| 0 | 0 | 0 | 0s | 0s | version::import |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | #!perl -w | ||||
| 2 | package version; | ||||
| 3 | |||||
| 4 | 2 | 50µs | 1 | 21µs | # spent 21µs within version::BEGIN@4 which was called:
# once (21µs+0s) by experimental::BEGIN@5 at line 4 # spent 21µs making 1 call to version::BEGIN@4 |
| 5 | 2 | 23µs | 2 | 14µs | # spent 11µs (8+3) within version::BEGIN@5 which was called:
# once (8µs+3µs) by experimental::BEGIN@5 at line 5 # spent 11µs making 1 call to version::BEGIN@5
# spent 3µs making 1 call to strict::import |
| 6 | 2 | 370µs | 2 | 526µs | # spent 429µs (332+97) within version::BEGIN@6 which was called:
# once (332µs+97µs) by experimental::BEGIN@5 at line 6 # spent 429µs making 1 call to version::BEGIN@6
# spent 97µs making 1 call to warnings::register::import |
| 7 | 1 | 3µs | 1 | 5µs | if ($] >= 5.015) { # spent 5µs making 1 call to warnings::register_categories |
| 8 | warnings::register_categories(qw/version/); | ||||
| 9 | } | ||||
| 10 | |||||
| 11 | 2 | 338µs | 2 | 877µs | # spent 795µs (592+202) within version::BEGIN@11 which was called:
# once (592µs+202µs) by experimental::BEGIN@5 at line 11 # spent 795µs making 1 call to version::BEGIN@11
# spent 82µs making 1 call to vars::import |
| 12 | |||||
| 13 | 1 | 200ns | $VERSION = 0.9916; | ||
| 14 | 1 | 200ns | $CLASS = 'version'; | ||
| 15 | |||||
| 16 | # !!!!Delete this next block completely when adding to Perl core!!!! | ||||
| 17 | { | ||||
| 18 | 2 | 2µs | local $SIG{'__DIE__'}; | ||
| 19 | 1 | 45µs | eval "use version::vxs $VERSION"; # spent 150µs executing statements in string eval # includes 291µs spent executing 1 call to 1 sub defined therein. | ||
| 20 | 1 | 2µs | if ( $@ ) { # don't have the XS version installed | ||
| 21 | eval "use version::vpp $VERSION"; # don't tempt fate | ||||
| 22 | die "$@" if ( $@ ); | ||||
| 23 | push @ISA, "version::vpp"; | ||||
| 24 | local $^W; | ||||
| 25 | *version::qv = \&version::vpp::qv; | ||||
| 26 | *version::declare = \&version::vpp::declare; | ||||
| 27 | *version::_VERSION = \&version::vpp::_VERSION; | ||||
| 28 | *version::vcmp = \&version::vpp::vcmp; | ||||
| 29 | *version::new = \&version::vpp::new; | ||||
| 30 | *version::numify = \&version::vpp::numify; | ||||
| 31 | *version::normal = \&version::vpp::normal; | ||||
| 32 | if ($] >= 5.009000) { | ||||
| 33 | 2 | 130µs | 2 | 29µs | # spent 19µs (8+11) within version::BEGIN@33 which was called:
# once (8µs+11µs) by experimental::BEGIN@5 at line 33 # spent 19µs making 1 call to version::BEGIN@33
# spent 11µs making 1 call to strict::unimport |
| 34 | *version::stringify = \&version::vpp::stringify; | ||||
| 35 | *{'version::(""'} = \&version::vpp::stringify; | ||||
| 36 | *{'version::(<=>'} = \&version::vpp::vcmp; | ||||
| 37 | *{'version::(cmp'} = \&version::vpp::vcmp; | ||||
| 38 | *version::parse = \&version::vpp::parse; | ||||
| 39 | } | ||||
| 40 | } | ||||
| 41 | else { # use XS module | ||||
| 42 | 1 | 7µs | push @ISA, "version::vxs"; | ||
| 43 | 1 | 2µs | local $^W; | ||
| 44 | 1 | 2µs | *version::declare = \&version::vxs::declare; | ||
| 45 | 1 | 500ns | *version::qv = \&version::vxs::qv; | ||
| 46 | 1 | 500ns | *version::_VERSION = \&version::vxs::_VERSION; | ||
| 47 | 1 | 500ns | *version::vcmp = \&version::vxs::VCMP; | ||
| 48 | 1 | 400ns | *version::new = \&version::vxs::new; | ||
| 49 | 1 | 400ns | *version::numify = \&version::vxs::numify; | ||
| 50 | 1 | 400ns | *version::normal = \&version::vxs::normal; | ||
| 51 | 1 | 2µs | if ($] >= 5.009000) { | ||
| 52 | 2 | 110µs | 2 | 27µs | # spent 17µs (7+10) within version::BEGIN@52 which was called:
# once (7µs+10µs) by experimental::BEGIN@5 at line 52 # spent 17µs making 1 call to version::BEGIN@52
# spent 10µs making 1 call to strict::unimport |
| 53 | 1 | 500ns | *version::stringify = \&version::vxs::stringify; | ||
| 54 | 1 | 1µs | *{'version::(""'} = \&version::vxs::stringify; | ||
| 55 | 1 | 700ns | *{'version::(<=>'} = \&version::vxs::VCMP; | ||
| 56 | 1 | 600ns | *{'version::(cmp'} = \&version::vxs::VCMP; | ||
| 57 | 1 | 600ns | *version::parse = \&version::vxs::parse; | ||
| 58 | } | ||||
| 59 | } | ||||
| 60 | } | ||||
| 61 | |||||
| 62 | # avoid using Exporter | ||||
| 63 | 1 | 143µs | require version::regex; | ||
| 64 | 1 | 1µs | *version::is_lax = \&version::regex::is_lax; | ||
| 65 | 1 | 300ns | *version::is_strict = \&version::regex::is_strict; | ||
| 66 | 1 | 500ns | *LAX = \$version::regex::LAX; | ||
| 67 | 1 | 200ns | *STRICT = \$version::regex::STRICT; | ||
| 68 | |||||
| 69 | sub import { | ||||
| 70 | 2 | 328µs | 2 | 27µs | # spent 17µs (7+10) within version::BEGIN@70 which was called:
# once (7µs+10µs) by experimental::BEGIN@5 at line 70 # spent 17µs making 1 call to version::BEGIN@70
# spent 10µs making 1 call to strict::unimport |
| 71 | my ($class) = shift; | ||||
| 72 | |||||
| 73 | # Set up any derived class | ||||
| 74 | unless ($class eq $CLASS) { | ||||
| 75 | local $^W; | ||||
| 76 | *{$class.'::declare'} = \&{$CLASS.'::declare'}; | ||||
| 77 | *{$class.'::qv'} = \&{$CLASS.'::qv'}; | ||||
| 78 | } | ||||
| 79 | |||||
| 80 | my %args; | ||||
| 81 | if (@_) { # any remaining terms are arguments | ||||
| 82 | map { $args{$_} = 1 } @_ | ||||
| 83 | } | ||||
| 84 | else { # no parameters at all on use line | ||||
| 85 | %args = | ||||
| 86 | ( | ||||
| 87 | qv => 1, | ||||
| 88 | 'UNIVERSAL::VERSION' => 1, | ||||
| 89 | ); | ||||
| 90 | } | ||||
| 91 | |||||
| 92 | my $callpkg = caller(); | ||||
| 93 | |||||
| 94 | if (exists($args{declare})) { | ||||
| 95 | *{$callpkg.'::declare'} = | ||||
| 96 | sub {return $class->declare(shift) } | ||||
| 97 | unless defined(&{$callpkg.'::declare'}); | ||||
| 98 | } | ||||
| 99 | |||||
| 100 | if (exists($args{qv})) { | ||||
| 101 | *{$callpkg.'::qv'} = | ||||
| 102 | sub {return $class->qv(shift) } | ||||
| 103 | unless defined(&{$callpkg.'::qv'}); | ||||
| 104 | } | ||||
| 105 | |||||
| 106 | if (exists($args{'UNIVERSAL::VERSION'})) { | ||||
| 107 | local $^W; | ||||
| 108 | *UNIVERSAL::VERSION | ||||
| 109 | = \&{$CLASS.'::_VERSION'}; | ||||
| 110 | } | ||||
| 111 | |||||
| 112 | if (exists($args{'VERSION'})) { | ||||
| 113 | *{$callpkg.'::VERSION'} = \&{$CLASS.'::_VERSION'}; | ||||
| 114 | } | ||||
| 115 | |||||
| 116 | if (exists($args{'is_strict'})) { | ||||
| 117 | *{$callpkg.'::is_strict'} = \&{$CLASS.'::is_strict'} | ||||
| 118 | unless defined(&{$callpkg.'::is_strict'}); | ||||
| 119 | } | ||||
| 120 | |||||
| 121 | if (exists($args{'is_lax'})) { | ||||
| 122 | *{$callpkg.'::is_lax'} = \&{$CLASS.'::is_lax'} | ||||
| 123 | unless defined(&{$callpkg.'::is_lax'}); | ||||
| 124 | } | ||||
| 125 | } | ||||
| 126 | |||||
| 127 | |||||
| 128 | 1 | 22µs | 1; |