← Index
NYTProf Performance Profile   « line view »
For ./view
  Run on Fri Jul 31 18:42:36 2015
Reported on Fri Jul 31 18:48:13 2015

Filename/usr/lib64/perl5/vendor_perl/version.pm
StatementsExecuted 78 statements in 1.14ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
33375µs75µsversion::::importversion::import
11141µs41µsversion::::BEGIN@4version::BEGIN@4
11115µs26µsversion::::BEGIN@43version::BEGIN@43
11111µs75µsversion::::BEGIN@7version::BEGIN@7
11110µs24µsversion::::BEGIN@27version::BEGIN@27
1119µs26µsversion::::BEGIN@5version::BEGIN@5
1119µs20µsversion::::BEGIN@60version::BEGIN@60
1116µs6µsversion::::(boolversion::(bool (xsub)
1115µs5µsversion::::(cmpversion::(cmp (xsub)
0000s0sversion::::__ANON__[:86]version::__ANON__[:86]
0000s0sversion::::__ANON__[:92]version::__ANON__[:92]
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1#!perl -w
2package version;
3
4276µs141µs
# spent 41µs within version::BEGIN@4 which was called: # once (41µs+0s) by Foswiki::BEGIN@208 at line 4
use 5.006002;
# spent 41µs making 1 call to version::BEGIN@4
5234µs244µ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
use strict;
# spent 26µs making 1 call to version::BEGIN@5 # spent 17µs making 1 call to strict::import
6
72150µs2138µ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
use vars qw(@ISA $VERSION $CLASS $STRICT $LAX *declare *qv);
# spent 75µs making 1 call to version::BEGIN@7 # spent 64µs making 1 call to vars::import
8
91500ns$VERSION = 0.9907;
101400ns$CLASS = 'version';
11
12# !!!!Delete this next block completely when adding to Perl core!!!!
13{
1423µs local $SIG{'__DIE__'};
15142µ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.
1611µ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) {
272142µs237µ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
no strict 'refs';
# 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
3518µs push @ISA, "version::vxs";
3611µs local $^W;
3713µs *version::declare = \&version::vxs::declare;
381700ns *version::qv = \&version::vxs::qv;
391500ns *version::_VERSION = \&version::vxs::_VERSION;
401700ns *version::vcmp = \&version::vxs::VCMP;
411600ns *version::new = \&version::vxs::new;
4212µs if ($] >= 5.009000) {
432115µs238µ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
no strict 'refs';
# spent 26µs making 1 call to version::BEGIN@43 # spent 12µs making 1 call to strict::unimport
441500ns *version::stringify = \&version::vxs::stringify;
4511µs *{'version::(""'} = \&version::vxs::stringify;
461800ns *{'version::(<=>'} = \&version::vxs::VCMP;
471800ns *version::parse = \&version::vxs::parse;
48 }
49 }
50}
51
52# avoid using Exporter
53190µsrequire version::regex;
5412µs*version::is_lax = \&version::regex::is_lax;
551400ns*version::is_strict = \&version::regex::is_strict;
561400ns*LAX = \$version::regex::LAX;
571200ns*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
sub import {
602358µs231µ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
no strict 'refs';
# spent 20µs making 1 call to version::BEGIN@60 # spent 11µs making 1 call to strict::unimport
6134µs my ($class) = shift;
62
63 # Set up any derived class
6432µs unless ($class eq $CLASS) {
65 local $^W;
66 *{$class.'::declare'} = \&{$CLASS.'::declare'};
67 *{$class.'::qv'} = \&{$CLASS.'::qv'};
68 }
69
703500ns my %args;
7132µs if (@_) { # any remaining terms are arguments
72 map { $args{$_} = 1 } @_
73 }
74 else { # no parameters at all on use line
7536µs %args =
76 (
77 qv => 1,
78 'UNIVERSAL::VERSION' => 1,
79 );
80 }
81
8237µs my $callpkg = caller();
83
8433µs if (exists($args{declare})) {
85 *{$callpkg.'::declare'} =
86 sub {return $class->declare(shift) }
87 unless defined(&{$callpkg.'::declare'});
88 }
89
90323µs if (exists($args{qv})) {
91 *{$callpkg.'::qv'} =
92 sub {return $class->qv(shift) }
93 unless defined(&{$callpkg.'::qv'});
94 }
95
9632µs if (exists($args{'UNIVERSAL::VERSION'})) {
9736µs local $^W;
98 *UNIVERSAL::VERSION
9938µs = \&{$CLASS.'::_VERSION'};
100 }
101
10231µs if (exists($args{'VERSION'})) {
103 *{$callpkg.'::VERSION'} = \&{$CLASS.'::_VERSION'};
104 }
105
10631µs if (exists($args{'is_strict'})) {
107 *{$callpkg.'::is_strict'} = \&{$CLASS.'::is_strict'}
108 unless defined(&{$callpkg.'::is_strict'});
109 }
110
111314µs if (exists($args{'is_lax'})) {
112 *{$callpkg.'::is_lax'} = \&{$CLASS.'::is_lax'}
113 unless defined(&{$callpkg.'::is_lax'});
114 }
115}
116
117
118122µs1;
 
# spent 6µs within version::(bool which was called: # once (6µs+0s) by DynaLoader::BEGIN@22 at line 57 of Config.pm
sub version::(bool; # xsub
# spent 5µs within version::(cmp which was called: # once (5µs+0s) by DynaLoader::BEGIN@22 at line 60 of Config.pm
sub version::(cmp; # xsub