← Index
NYTProf Performance Profile   « line view »
For -e
  Run on Thu Jun 30 16:16:00 2016
Reported on Thu Jun 30 16:16:08 2016

Filename/home/s1/perl5/perlbrew/perls/perl-5.22.1/lib/site_perl/5.22.1/x86_64-linux/version.pm
StatementsExecuted 42 statements in 2.27ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
111854µs1.13msversion::::BEGIN@11version::BEGIN@11
111458µs588µsversion::::BEGIN@6version::BEGIN@6
11137µs37µsversion::::BEGIN@4version::BEGIN@4
11113µs17µsversion::::BEGIN@5version::BEGIN@5
11111µs27µsversion::::BEGIN@33version::BEGIN@33
11110µs24µsversion::::BEGIN@52version::BEGIN@52
11110µs23µsversion::::BEGIN@70version::BEGIN@70
0000s0sversion::::__ANON__[:102]version::__ANON__[:102]
0000s0sversion::::__ANON__[:96]version::__ANON__[:96]
0000s0sversion::::importversion::import
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µs137µs
# spent 37µs within version::BEGIN@4 which was called: # once (37µs+0s) by experimental::BEGIN@5 at line 4
use 5.006002;
# spent 37µs making 1 call to version::BEGIN@4
5236µs222µs
# spent 17µs (13+4) within version::BEGIN@5 which was called: # once (13µs+4µs) by experimental::BEGIN@5 at line 5
use strict;
# spent 17µs making 1 call to version::BEGIN@5 # spent 4µs making 1 call to strict::import
62513µs2717µs
# spent 588µs (458+129) within version::BEGIN@6 which was called: # once (458µs+129µs) by experimental::BEGIN@5 at line 6
use warnings::register;
# spent 588µs making 1 call to version::BEGIN@6 # spent 130µs making 1 call to warnings::register::import
714µs17µsif ($] >= 5.015) {
# spent 7µs making 1 call to warnings::register_categories
8 warnings::register_categories(qw/version/);
9}
10
112499µs21.24ms
# spent 1.13ms (854µs+272µs) within version::BEGIN@11 which was called: # once (854µs+272µs) by experimental::BEGIN@5 at line 11
use vars qw(@ISA $VERSION $CLASS $STRICT $LAX *declare *qv);
# spent 1.13ms making 1 call to version::BEGIN@11 # spent 111µs making 1 call to vars::import
12
131300ns$VERSION = 0.9916;
141300ns$CLASS = 'version';
15
16# !!!!Delete this next block completely when adding to Perl core!!!!
17{
1824µs local $SIG{'__DIE__'};
19162µs eval "use version::vxs $VERSION";
# spent 217µs executing statements in string eval
# includes 415µs spent executing 1 call to 1 sub defined therein.
2013µ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) {
332186µs242µs
# spent 27µs (11+16) within version::BEGIN@33 which was called: # once (11µs+16µs) by experimental::BEGIN@5 at line 33
no strict 'refs';
# spent 27µs making 1 call to version::BEGIN@33 # spent 16µ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
4219µs push @ISA, "version::vxs";
4312µs local $^W;
4412µs *version::declare = \&version::vxs::declare;
451700ns *version::qv = \&version::vxs::qv;
461600ns *version::_VERSION = \&version::vxs::_VERSION;
471500ns *version::vcmp = \&version::vxs::VCMP;
481600ns *version::new = \&version::vxs::new;
491600ns *version::numify = \&version::vxs::numify;
501500ns *version::normal = \&version::vxs::normal;
5112µs if ($] >= 5.009000) {
522148µs238µs
# spent 24µs (10+14) within version::BEGIN@52 which was called: # once (10µs+14µs) by experimental::BEGIN@5 at line 52
no strict 'refs';
# spent 24µs making 1 call to version::BEGIN@52 # spent 14µs making 1 call to strict::unimport
531700ns *version::stringify = \&version::vxs::stringify;
5412µs *{'version::(""'} = \&version::vxs::stringify;
551900ns *{'version::(<=>'} = \&version::vxs::VCMP;
561800ns *{'version::(cmp'} = \&version::vxs::VCMP;
571700ns *version::parse = \&version::vxs::parse;
58 }
59 }
60}
61
62# avoid using Exporter
631234µsrequire version::regex;
6412µs*version::is_lax = \&version::regex::is_lax;
651600ns*version::is_strict = \&version::regex::is_strict;
661700ns*LAX = \$version::regex::LAX;
671300ns*STRICT = \$version::regex::STRICT;
68
69sub import {
702450µs236µs
# spent 23µs (10+13) within version::BEGIN@70 which was called: # once (10µs+13µs) by experimental::BEGIN@5 at line 70
no strict 'refs';
# spent 23µs making 1 call to version::BEGIN@70 # spent 13µ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
128129µs1;