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