← Index
NYTProf Performance Profile   « line view »
For -e
  Run on Thu Jun 30 16:34:56 2016
Reported on Thu Jun 30 16:35: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 1.59ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
111592µs795µsversion::::BEGIN@11version::BEGIN@11
111332µs429µsversion::::BEGIN@6version::BEGIN@6
11121µs21µsversion::::BEGIN@4version::BEGIN@4
1118µs11µsversion::::BEGIN@5version::BEGIN@5
1118µs19µsversion::::BEGIN@33version::BEGIN@33
1117µs17µsversion::::BEGIN@70version::BEGIN@70
1117µs17µsversion::::BEGIN@52version::BEGIN@52
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
4250µs121µs
# spent 21µs within version::BEGIN@4 which was called: # once (21µs+0s) by experimental::BEGIN@5 at line 4
use 5.006002;
# spent 21µs making 1 call to version::BEGIN@4
5223µs214µs
# spent 11µs (8+3) within version::BEGIN@5 which was called: # once (8µs+3µs) by experimental::BEGIN@5 at line 5
use strict;
# spent 11µs making 1 call to version::BEGIN@5 # spent 3µs making 1 call to strict::import
62370µs2526µs
# spent 429µs (332+97) within version::BEGIN@6 which was called: # once (332µs+97µs) by experimental::BEGIN@5 at line 6
use warnings::register;
# spent 429µs making 1 call to version::BEGIN@6 # spent 97µs making 1 call to warnings::register::import
713µs15µsif ($] >= 5.015) {
# spent 5µs making 1 call to warnings::register_categories
8 warnings::register_categories(qw/version/);
9}
10
112338µs2877µs
# spent 795µs (592+202) within version::BEGIN@11 which was called: # once (592µs+202µs) by experimental::BEGIN@5 at line 11
use vars qw(@ISA $VERSION $CLASS $STRICT $LAX *declare *qv);
# spent 795µs making 1 call to version::BEGIN@11 # spent 82µs making 1 call to vars::import
12
131200ns$VERSION = 0.9916;
141200ns$CLASS = 'version';
15
16# !!!!Delete this next block completely when adding to Perl core!!!!
17{
1822µs local $SIG{'__DIE__'};
19145µs eval "use version::vxs $VERSION";
# spent 150µs executing statements in string eval
# includes 291µs spent executing 1 call to 1 sub defined therein.
2012µ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) {
332130µs229µs
# spent 19µs (8+11) within version::BEGIN@33 which was called: # once (8µs+11µs) by experimental::BEGIN@5 at line 33
no strict 'refs';
# spent 19µs making 1 call to version::BEGIN@33 # spent 11µ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
4217µs push @ISA, "version::vxs";
4312µs local $^W;
4412µs *version::declare = \&version::vxs::declare;
451500ns *version::qv = \&version::vxs::qv;
461500ns *version::_VERSION = \&version::vxs::_VERSION;
471500ns *version::vcmp = \&version::vxs::VCMP;
481400ns *version::new = \&version::vxs::new;
491400ns *version::numify = \&version::vxs::numify;
501400ns *version::normal = \&version::vxs::normal;
5112µs if ($] >= 5.009000) {
522110µs227µs
# spent 17µs (7+10) within version::BEGIN@52 which was called: # once (7µs+10µs) by experimental::BEGIN@5 at line 52
no strict 'refs';
# spent 17µs making 1 call to version::BEGIN@52 # spent 10µs making 1 call to strict::unimport
531500ns *version::stringify = \&version::vxs::stringify;
5411µs *{'version::(""'} = \&version::vxs::stringify;
551700ns *{'version::(<=>'} = \&version::vxs::VCMP;
561600ns *{'version::(cmp'} = \&version::vxs::VCMP;
571600ns *version::parse = \&version::vxs::parse;
58 }
59 }
60}
61
62# avoid using Exporter
631143µsrequire version::regex;
6411µs*version::is_lax = \&version::regex::is_lax;
651300ns*version::is_strict = \&version::regex::is_strict;
661500ns*LAX = \$version::regex::LAX;
671200ns*STRICT = \$version::regex::STRICT;
68
69sub import {
702328µs227µs
# spent 17µs (7+10) within version::BEGIN@70 which was called: # once (7µs+10µs) by experimental::BEGIN@5 at line 70
no strict 'refs';
# spent 17µs making 1 call to version::BEGIN@70 # spent 10µ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
128122µs1;