Filename | /usr/share/perl/5.20/version.pm |
Statements | Executed 59 statements in 1.11ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
26 | 26 | 14 | 225µs | 225µs | _VERSION (xsub) | version::
3 | 3 | 3 | 52µs | 52µs | import | version::
1 | 1 | 1 | 17µs | 17µs | BEGIN@4 | version::
1 | 1 | 1 | 14µs | 24µs | BEGIN@5 | version::
1 | 1 | 1 | 10µs | 15µs | __ANON__[:52] | version::
1 | 1 | 1 | 6µs | 6µs | (bool (xsub) | version::
1 | 1 | 1 | 6µs | 14µs | BEGIN@20 | version::
1 | 1 | 1 | 6µs | 71µs | BEGIN@7 | version::
1 | 1 | 1 | 5µs | 5µs | (cmp (xsub) | version::
1 | 1 | 1 | 5µs | 5µs | qv (xsub) | version::
0 | 0 | 0 | 0s | 0s | __ANON__[:46] | version::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | #!perl -w | ||||
2 | package version; | ||||
3 | |||||
4 | 2 | 41µs | 1 | 17µs | # spent 17µs within version::BEGIN@4 which was called:
# once (17µs+0s) by Module::Load::Conditional::BEGIN@12 at line 4 # spent 17µs making 1 call to version::BEGIN@4 |
5 | 2 | 27µs | 2 | 35µs | # spent 24µs (14+10) within version::BEGIN@5 which was called:
# once (14µs+10µs) by Module::Load::Conditional::BEGIN@12 at line 5 # spent 24µs making 1 call to version::BEGIN@5
# spent 10µs making 1 call to strict::import |
6 | |||||
7 | 2 | 73µs | 2 | 136µs | # spent 71µs (6+65) within version::BEGIN@7 which was called:
# once (6µs+65µs) by Module::Load::Conditional::BEGIN@12 at line 7 # spent 71µs making 1 call to version::BEGIN@7
# spent 65µs making 1 call to vars::import |
8 | |||||
9 | 1 | 200ns | $VERSION = 0.9909; | ||
10 | 1 | 200ns | $CLASS = 'version'; | ||
11 | |||||
12 | # avoid using Exporter | ||||
13 | 1 | 636µs | require version::regex; | ||
14 | 1 | 1µs | *version::is_lax = \&version::regex::is_lax; | ||
15 | 1 | 300ns | *version::is_strict = \&version::regex::is_strict; | ||
16 | 1 | 300ns | *LAX = \$version::regex::LAX; | ||
17 | 1 | 100ns | *STRICT = \$version::regex::STRICT; | ||
18 | |||||
19 | # spent 52µs within version::import which was called 3 times, avg 17µs/call:
# once (22µs+0s) by Koha::DateUtils::BEGIN@27 at line 27 of Koha/DateUtils.pm
# once (18µs+0s) by Module::Load::Conditional::BEGIN@12 at line 12 of Module/Load/Conditional.pm
# once (12µs+0s) by Module::Metadata::BEGIN@21 at line 21 of Module/Metadata.pm | ||||
20 | 2 | 255µs | 2 | 22µs | # spent 14µs (6+8) within version::BEGIN@20 which was called:
# once (6µs+8µs) by Module::Load::Conditional::BEGIN@12 at line 20 # spent 14µs making 1 call to version::BEGIN@20
# spent 8µs making 1 call to strict::unimport |
21 | 3 | 2µs | my ($class) = shift; | ||
22 | |||||
23 | # Set up any derived class | ||||
24 | 3 | 2µs | unless ($class eq $CLASS) { | ||
25 | local $^W; | ||||
26 | *{$class.'::declare'} = \&{$CLASS.'::declare'}; | ||||
27 | *{$class.'::qv'} = \&{$CLASS.'::qv'}; | ||||
28 | } | ||||
29 | |||||
30 | 3 | 700ns | my %args; | ||
31 | 3 | 1µs | if (@_) { # any remaining terms are arguments | ||
32 | map { $args{$_} = 1 } @_ | ||||
33 | } | ||||
34 | else { # no parameters at all on use line | ||||
35 | 3 | 4µs | %args = | ||
36 | ( | ||||
37 | qv => 1, | ||||
38 | 'UNIVERSAL::VERSION' => 1, | ||||
39 | ); | ||||
40 | } | ||||
41 | |||||
42 | 3 | 2µs | my $callpkg = caller(); | ||
43 | |||||
44 | 3 | 900ns | if (exists($args{declare})) { | ||
45 | *{$callpkg.'::declare'} = | ||||
46 | sub {return $class->declare(shift) } | ||||
47 | unless defined(&{$callpkg.'::declare'}); | ||||
48 | } | ||||
49 | |||||
50 | 3 | 18µs | if (exists($args{qv})) { | ||
51 | 1 | 15µs | 1 | 5µs | *{$callpkg.'::qv'} = # spent 5µs making 1 call to version::qv |
52 | # spent 15µs (10+5) within version::__ANON__[/usr/share/perl/5.20/version.pm:52] which was called:
# once (10µs+5µs) by C4::Koha::BEGIN@28 at line 27 of Koha/DateUtils.pm | ||||
53 | unless defined(&{$callpkg.'::qv'}); | ||||
54 | } | ||||
55 | |||||
56 | 3 | 2µs | if (exists($args{'UNIVERSAL::VERSION'})) { | ||
57 | 3 | 5µs | local $^W; | ||
58 | *UNIVERSAL::VERSION | ||||
59 | 3 | 8µs | = \&{$CLASS.'::_VERSION'}; | ||
60 | } | ||||
61 | |||||
62 | 3 | 700ns | if (exists($args{'VERSION'})) { | ||
63 | *{$callpkg.'::VERSION'} = \&{$CLASS.'::_VERSION'}; | ||||
64 | } | ||||
65 | |||||
66 | 3 | 800ns | if (exists($args{'is_strict'})) { | ||
67 | *{$callpkg.'::is_strict'} = \&{$CLASS.'::is_strict'} | ||||
68 | unless defined(&{$callpkg.'::is_strict'}); | ||||
69 | } | ||||
70 | |||||
71 | 3 | 12µs | if (exists($args{'is_lax'})) { | ||
72 | *{$callpkg.'::is_lax'} = \&{$CLASS.'::is_lax'} | ||||
73 | unless defined(&{$callpkg.'::is_lax'}); | ||||
74 | } | ||||
75 | } | ||||
76 | |||||
77 | |||||
78 | 1 | 3µs | 1; | ||
# spent 6µs within version::(bool which was called:
# once (6µs+0s) by DynaLoader::BEGIN@21 at line 59 of Config.pm | |||||
# spent 5µs within version::(cmp which was called:
# once (5µs+0s) by DynaLoader::BEGIN@21 at line 62 of Config.pm | |||||
# spent 225µs within version::_VERSION which was called 26 times, avg 9µs/call:
# once (22µs+0s) by Text::CSV::BEGIN@1 at line 1 of (eval 60)[Text/CSV.pm:151]
# once (14µs+0s) by DateTime::BEGIN@14 at line 14 of DateTime.pm
# once (12µs+0s) by DateTime::Format::Builder::BEGIN@11 at line 11 of DateTime/Format/Builder.pm
# once (11µs+0s) by C4::Letters::BEGIN@23 at line 1 of (eval 54)[MIME/Lite.pm:447]
# once (10µs+0s) by DateTime::Set::BEGIN@9 at line 9 of DateTime/Set.pm
# once (9µs+0s) by Module::Metadata::BEGIN@21 at line 21 of Module/Metadata.pm
# once (9µs+0s) by DateTime::Format::Builder::Parser::Strptime::BEGIN@10 at line 10 of DateTime/Format/Builder/Parser/Strptime.pm
# once (9µs+0s) by DateTime::Format::Builder::Parser::BEGIN@375 at line 375 of DateTime/Format/Builder/Parser.pm
# once (9µs+0s) by Crypt::Eksblowfish::Bcrypt::BEGIN@42 at line 42 of Crypt/Eksblowfish/Bcrypt.pm
# once (9µs+0s) by DateTime::Set::BEGIN@6 at line 6 of DateTime/Set.pm
# once (9µs+0s) by Set::Infinite::_recurrence::BEGIN@15 at line 15 of Set/Infinite/_recurrence.pm
# once (8µs+0s) by DateTime::Format::Strptime::BEGIN@7 at line 7 of DateTime/Format/Strptime.pm
# once (8µs+0s) by File::Temp::BEGIN@31 at line 31 of File/Temp.pm
# once (8µs+0s) by Encode::BEGIN@12 at line 12 of Encode.pm
# once (8µs+0s) by File::Temp::BEGIN@13 at line 13 of File/Temp.pm
# once (7µs+0s) by File::Temp::BEGIN@11 at line 11 of File/Temp.pm
# once (7µs+0s) by File::Temp::BEGIN@43 at line 43 of File/Temp.pm
# once (7µs+0s) by JSON::BEGIN@2 at line 2 of (eval 67)[JSON.pm:252]
# once (7µs+0s) by File::Temp::BEGIN@14 at line 14 of File/Temp.pm
# once (6µs+0s) by DateTime::BEGIN@15 at line 15 of DateTime.pm
# once (6µs+0s) by DateTime::Format::Strptime::BEGIN@8 at line 8 of DateTime/Format/Strptime.pm
# once (6µs+0s) by DateTime::Format::Builder::BEGIN@12 at line 14 of DateTime/Format/Builder.pm
# once (6µs+0s) by Crypt::Eksblowfish::Bcrypt::BEGIN@43 at line 43 of Crypt/Eksblowfish/Bcrypt.pm
# once (6µs+0s) by DateTime::BEGIN@16 at line 17 of DateTime.pm
# once (6µs+0s) by DateTime::Format::Strptime::BEGIN@10 at line 10 of DateTime/Format/Strptime.pm
# once (6µs+0s) by DateTime::Format::Strptime::BEGIN@9 at line 9 of DateTime/Format/Strptime.pm | |||||
# spent 5µs within version::qv which was called:
# once (5µs+0s) by version::__ANON__[/usr/share/perl/5.20/version.pm:52] at line 51 |