← Index
NYTProf Performance Profile   « line view »
For ../prof.pl
  Run on Wed Dec 14 16:10:05 2022
Reported on Wed Dec 14 16:12:56 2022

Filename/Users/ether/perl5/perlbrew/perls/36.0/lib/5.36.0/version.pm
StatementsExecuted 21 statements in 1.05ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
111315µs354µsversion::::BEGIN@6version::BEGIN@6
312160µs60µsversion::::newversion::new (xsub)
11127µs27µsversion::::BEGIN@4version::BEGIN@4
11113µs13µsversion::::(cmpversion::(cmp (xsub)
1117µs16µsversion::::BEGIN@27version::BEGIN@27
1117µs8µsversion::::BEGIN@5version::BEGIN@5
1115µs5µsversion::::(boolversion::(bool (xsub)
0000s0sversion::::__ANON__[:53]version::__ANON__[:53]
0000s0sversion::::__ANON__[:59]version::__ANON__[:59]
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
4253µs127µs
# spent 27µs within version::BEGIN@4 which was called: # once (27µs+0s) by experimental::BEGIN@5 at line 4
use 5.006002;
# spent 27µs making 1 call to version::BEGIN@4
5222µs29µs
# spent 8µs (7+1000ns) within version::BEGIN@5 which was called: # once (7µs+1000ns) by experimental::BEGIN@5 at line 5
use strict;
# spent 8µs making 1 call to version::BEGIN@5 # spent 1µs making 1 call to strict::import
62433µs2393µs
# spent 354µs (315+39) within version::BEGIN@6 which was called: # once (315µs+39µs) by experimental::BEGIN@5 at line 6
use warnings::register;
# spent 354µs making 1 call to version::BEGIN@6 # spent 39µs making 1 call to warnings::register::import
712µs14µsif ($] >= 5.015) {
# spent 4µs making 1 call to warnings::register_categories
8 warnings::register_categories(qw/version/);
9}
10
1110sour $VERSION = 0.9929;
1210sour $CLASS = 'version';
13our (@ISA, $STRICT, $LAX);
14
15# avoid using Exporter
161188µsrequire version::regex;
1713µs*version::is_lax = \&version::regex::is_lax;
1810s*version::is_strict = \&version::regex::is_strict;
1911µs*LAX = \$version::regex::LAX;
2011µs*LAX_DECIMAL_VERSION = \$version::regex::LAX_DECIMAL_VERSION;
2110s*LAX_DOTTED_DECIMAL_VERSION = \$version::regex::LAX_DOTTED_DECIMAL_VERSION;
2211µs*STRICT = \$version::regex::STRICT;
2310s*STRICT_DECIMAL_VERSION = \$version::regex::STRICT_DECIMAL_VERSION;
2411µs*STRICT_DOTTED_DECIMAL_VERSION = \$version::regex::STRICT_DOTTED_DECIMAL_VERSION;
25
26sub import {
272333µs225µs
# spent 16µs (7+9) within version::BEGIN@27 which was called: # once (7µs+9µs) by experimental::BEGIN@5 at line 27
no strict 'refs';
# spent 16µs making 1 call to version::BEGIN@27 # spent 9µs making 1 call to strict::unimport
28 my ($class) = shift;
29
30 # Set up any derived class
31 unless ($class eq $CLASS) {
32 local $^W;
33 *{$class.'::declare'} = \&{$CLASS.'::declare'};
34 *{$class.'::qv'} = \&{$CLASS.'::qv'};
35 }
36
37 my %args;
38 if (@_) { # any remaining terms are arguments
39 map { $args{$_} = 1 } @_
40 }
41 else { # no parameters at all on use line
42 %args =
43 (
44 qv => 1,
45 'UNIVERSAL::VERSION' => 1,
46 );
47 }
48
49 my $callpkg = caller();
50
51 if (exists($args{declare})) {
52 *{$callpkg.'::declare'} =
53 sub {return $class->declare(shift) }
54 unless defined(&{$callpkg.'::declare'});
55 }
56
57 if (exists($args{qv})) {
58 *{$callpkg.'::qv'} =
59 sub {return $class->qv(shift) }
60 unless defined(&{$callpkg.'::qv'});
61 }
62
63 if (exists($args{'UNIVERSAL::VERSION'})) {
64 local $^W;
65 *UNIVERSAL::VERSION
66 = \&{$CLASS.'::_VERSION'};
67 }
68
69 if (exists($args{'VERSION'})) {
70 *{$callpkg.'::VERSION'} = \&{$CLASS.'::_VERSION'};
71 }
72
73 if (exists($args{'is_strict'})) {
74 *{$callpkg.'::is_strict'} = \&{$CLASS.'::is_strict'}
75 unless defined(&{$callpkg.'::is_strict'});
76 }
77
78 if (exists($args{'is_lax'})) {
79 *{$callpkg.'::is_lax'} = \&{$CLASS.'::is_lax'}
80 unless defined(&{$callpkg.'::is_lax'});
81 }
82}
83
84
8518µs1;
 
# spent 5µs within version::(bool which was called: # once (5µs+0s) by Moo::_Utils::BEGIN@35 at line 59 of Config.pm
sub version::(bool; # xsub
# spent 13µs within version::(cmp which was called: # once (13µs+0s) by Moo::_Utils::BEGIN@35 at line 62 of Config.pm
sub version::(cmp; # xsub
# spent 60µs within version::new which was called 31 times, avg 2µs/call: # 28 times (56µs+0s) by OpenAPI::Modern::BEGIN@13 at line 56 of experimental.pm, avg 2µs/call # 3 times (4µs+0s) by OpenAPI::Modern::BEGIN@13 at line 57 of experimental.pm, avg 1µs/call
sub version::new; # xsub