| Filename | /usr/share/perl/5.36/version.pm |
| Statements | Executed 63 statements in 446µs |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 3 | 3 | 3 | 38µs | 50µs | version::import |
| 7 | 5 | 4 | 23µs | 23µs | version::_VERSION (xsub) |
| 1 | 1 | 1 | 11µs | 11µs | version::BEGIN@4 |
| 1 | 1 | 1 | 4µs | 4µs | version::declare (xsub) |
| 1 | 1 | 1 | 4µs | 21µs | version::BEGIN@6 |
| 1 | 1 | 1 | 4µs | 7µs | version::BEGIN@27 |
| 1 | 1 | 1 | 3µs | 4µs | version::BEGIN@5 |
| 1 | 1 | 1 | 3µs | 3µs | version::(bool (xsub) |
| 1 | 1 | 1 | 2µs | 2µs | version::(cmp (xsub) |
| 0 | 0 | 0 | 0s | 0s | version::__ANON__[:53] |
| 0 | 0 | 0 | 0s | 0s | version::__ANON__[:59] |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | #!perl -w | ||||
| 2 | package version; | ||||
| 3 | |||||
| 4 | 2 | 25µs | 1 | 11µs | # spent 11µs within version::BEGIN@4 which was called:
# once (11µs+0s) by Module::Load::Conditional::BEGIN@12 at line 4 # spent 11µs making 1 call to version::BEGIN@4 |
| 5 | 2 | 13µs | 2 | 6µs | # spent 4µs (3+1) within version::BEGIN@5 which was called:
# once (3µs+1µs) by Module::Load::Conditional::BEGIN@12 at line 5 # spent 4µs making 1 call to version::BEGIN@5
# spent 1µs making 1 call to strict::import |
| 6 | 2 | 78µs | 2 | 38µs | # spent 21µs (4+17) within version::BEGIN@6 which was called:
# once (4µs+17µs) by Module::Load::Conditional::BEGIN@12 at line 6 # spent 21µs making 1 call to version::BEGIN@6
# spent 17µs making 1 call to warnings::register::import |
| 7 | 1 | 1µs | 1 | 2µs | if ($] >= 5.015) { # spent 2µs making 1 call to warnings::register_categories |
| 8 | warnings::register_categories(qw/version/); | ||||
| 9 | } | ||||
| 10 | |||||
| 11 | 1 | 200ns | our $VERSION = 0.9929; | ||
| 12 | 1 | 100ns | our $CLASS = 'version'; | ||
| 13 | our (@ISA, $STRICT, $LAX); | ||||
| 14 | |||||
| 15 | # avoid using Exporter | ||||
| 16 | 1 | 74µs | require version::regex; | ||
| 17 | 1 | 800ns | *version::is_lax = \&version::regex::is_lax; | ||
| 18 | 1 | 100ns | *version::is_strict = \&version::regex::is_strict; | ||
| 19 | 1 | 300ns | *LAX = \$version::regex::LAX; | ||
| 20 | 1 | 100ns | *LAX_DECIMAL_VERSION = \$version::regex::LAX_DECIMAL_VERSION; | ||
| 21 | 1 | 100ns | *LAX_DOTTED_DECIMAL_VERSION = \$version::regex::LAX_DOTTED_DECIMAL_VERSION; | ||
| 22 | 1 | 100ns | *STRICT = \$version::regex::STRICT; | ||
| 23 | 1 | 100ns | *STRICT_DECIMAL_VERSION = \$version::regex::STRICT_DECIMAL_VERSION; | ||
| 24 | 1 | 0s | *STRICT_DOTTED_DECIMAL_VERSION = \$version::regex::STRICT_DOTTED_DECIMAL_VERSION; | ||
| 25 | |||||
| 26 | # spent 50µs (38+12) within version::import which was called 3 times, avg 17µs/call:
# once (15µs+5µs) by ExtUtils::MakeMaker::version::BEGIN@1 at line 1 of (eval 47)[ExtUtils/MakeMaker/version.pm:25]
# once (13µs+4µs) by Module::Load::Conditional::BEGIN@12 at line 12 of Module/Load/Conditional.pm
# once (9µs+3µs) by Module::Metadata::BEGIN@27 at line 27 of Module/Metadata.pm | ||||
| 27 | 2 | 210µs | 2 | 10µs | # spent 7µs (4+3) within version::BEGIN@27 which was called:
# once (4µs+3µs) by Module::Load::Conditional::BEGIN@12 at line 27 # spent 7µs making 1 call to version::BEGIN@27
# spent 3µs making 1 call to strict::unimport |
| 28 | 3 | 1µs | my ($class) = shift; | ||
| 29 | |||||
| 30 | # Set up any derived class | ||||
| 31 | 3 | 900ns | unless ($class eq $CLASS) { | ||
| 32 | local $^W; | ||||
| 33 | *{$class.'::declare'} = \&{$CLASS.'::declare'}; | ||||
| 34 | *{$class.'::qv'} = \&{$CLASS.'::qv'}; | ||||
| 35 | } | ||||
| 36 | |||||
| 37 | 3 | 500ns | my %args; | ||
| 38 | 3 | 900ns | if (@_) { # any remaining terms are arguments | ||
| 39 | map { $args{$_} = 1 } @_ | ||||
| 40 | } | ||||
| 41 | else { # no parameters at all on use line | ||||
| 42 | 3 | 3µs | %args = | ||
| 43 | ( | ||||
| 44 | qv => 1, | ||||
| 45 | 'UNIVERSAL::VERSION' => 1, | ||||
| 46 | ); | ||||
| 47 | } | ||||
| 48 | |||||
| 49 | 3 | 3µs | 3 | 12µs | my $callpkg = caller(); # spent 12µs making 3 calls to Contextual::Return::__ANON__[Contextual/Return.pm:30], avg 4µs/call |
| 50 | |||||
| 51 | 3 | 1µs | if (exists($args{declare})) { | ||
| 52 | *{$callpkg.'::declare'} = | ||||
| 53 | sub {return $class->declare(shift) } | ||||
| 54 | unless defined(&{$callpkg.'::declare'}); | ||||
| 55 | } | ||||
| 56 | |||||
| 57 | 3 | 11µs | if (exists($args{qv})) { | ||
| 58 | *{$callpkg.'::qv'} = | ||||
| 59 | sub {return $class->qv(shift) } | ||||
| 60 | unless defined(&{$callpkg.'::qv'}); | ||||
| 61 | } | ||||
| 62 | |||||
| 63 | 3 | 1µs | if (exists($args{'UNIVERSAL::VERSION'})) { | ||
| 64 | 3 | 3µs | local $^W; | ||
| 65 | *UNIVERSAL::VERSION | ||||
| 66 | 3 | 4µs | = \&{$CLASS.'::_VERSION'}; | ||
| 67 | } | ||||
| 68 | |||||
| 69 | 3 | 500ns | if (exists($args{'VERSION'})) { | ||
| 70 | *{$callpkg.'::VERSION'} = \&{$CLASS.'::_VERSION'}; | ||||
| 71 | } | ||||
| 72 | |||||
| 73 | 3 | 500ns | if (exists($args{'is_strict'})) { | ||
| 74 | *{$callpkg.'::is_strict'} = \&{$CLASS.'::is_strict'} | ||||
| 75 | unless defined(&{$callpkg.'::is_strict'}); | ||||
| 76 | } | ||||
| 77 | |||||
| 78 | 3 | 6µs | if (exists($args{'is_lax'})) { | ||
| 79 | *{$callpkg.'::is_lax'} = \&{$CLASS.'::is_lax'} | ||||
| 80 | unless defined(&{$callpkg.'::is_lax'}); | ||||
| 81 | } | ||||
| 82 | } | ||||
| 83 | |||||
| 84 | |||||
| 85 | 1 | 5µs | 1; | ||
# spent 3µs within version::(bool which was called:
# once (3µs+0s) by diagnostics::BEGIN@196 at line 59 of Config.pm | |||||
# spent 2µs within version::(cmp which was called:
# once (2µs+0s) by diagnostics::BEGIN@196 at line 62 of Config.pm | |||||
# spent 23µs within version::_VERSION which was called 7 times, avg 3µs/call:
# 2 times (6µs+0s) by strictures::VERSION at line 99 of strictures.pm, avg 3µs/call
# 2 times (600ns+0s) by Gradescope::Color::BEGIN@4 or Gradescope::Translate::BEGIN@4 at line 105 of strictures.pm, avg 300ns/call
# once (6µs+0s) by Pod::Simple::BEGIN@8 at line 8 of Pod/Simple.pm
# once (6µs+0s) by Encode::BEGIN@15 at line 15 of Encode.pm
# once (5µs+0s) by Module::Metadata::BEGIN@27 at line 27 of Module/Metadata.pm | |||||
# spent 4µs within version::declare which was called:
# once (4µs+0s) by main::RUNTIME at line 46 of /home/hejohns/documentsNoSync/22f/490/gradescope-utils/bin/split.pl |