← Index
NYTProf Performance Profile   « line view »
For fastest.pl
  Run on Fri Jan 31 20:48:16 2014
Reported on Fri Jan 31 20:49:41 2014

Filename/opt/perl-5.18.1/lib/site_perl/5.18.1/strictures.pm
StatementsExecuted 111 statements in 1.04ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
12109147µs522µsstrictures::::importstrictures::import
99982µs161µsstrictures::::VERSIONstrictures::VERSION
31125µs25µsstrictures::::CORE:ftisstrictures::CORE:ftis (opcode)
121120µs20µsstrictures::::CORE:matchstrictures::CORE:match (opcode)
11115µs32µsstrictures::::BEGIN@3strictures::BEGIN@3
11111µs23µsstrictures::::BEGIN@20strictures::BEGIN@20
11110µs56µsstrictures::::BEGIN@6strictures::BEGIN@6
1118µs29µsstrictures::::BEGIN@4strictures::BEGIN@4
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package strictures;
2
3235µs249µs
# spent 32µs (15+17) within strictures::BEGIN@3 which was called: # once (15µs+17µs) by Moo::BEGIN@3 at line 3
use strict;
# spent 32µs making 1 call to strictures::BEGIN@3 # spent 17µs making 1 call to strict::import
4249µs249µs
# spent 29µs (8+20) within strictures::BEGIN@4 which was called: # once (8µs+20µs) by Moo::BEGIN@3 at line 4
use warnings FATAL => 'all';
# spent 29µs making 1 call to strictures::BEGIN@4 # spent 20µs making 1 call to warnings::import
5
62106µs2103µs
# spent 56µs (10+46) within strictures::BEGIN@6 which was called: # once (10µs+46µs) by Moo::BEGIN@3 at line 6
use constant _PERL_LT_5_8_4 => ($] < 5.008004) ? 1 : 0;
# spent 56µs making 1 call to strictures::BEGIN@6 # spent 46µs making 1 call to constant::import
7
81800nsour $VERSION = '1.004004'; # 1.4.4
9
10
# spent 161µs (82+79) within strictures::VERSION which was called 9 times, avg 18µs/call: # once (14µs+8µs) by Moo::BEGIN@3 at line 3 of Moo.pm # once (8µs+13µs) by Sub::Defer::BEGIN@3 at line 3 of Sub/Defer.pm # once (11µs+10µs) by Method::Generate::Constructor::BEGIN@3 at line 3 of Method/Generate/Constructor.pm # once (9µs+8µs) by Moo::sification::BEGIN@3 at line 3 of Moo/sification.pm # once (8µs+8µs) by Method::Generate::Accessor::BEGIN@3 at line 3 of Method/Generate/Accessor.pm # once (8µs+8µs) by Sub::Quote::BEGIN@3 at line 3 of Sub/Quote.pm # once (8µs+8µs) by Moo::HandleMoose::BEGIN@3 at line 3 of Moo/HandleMoose.pm # once (8µs+8µs) by Moo::Object::BEGIN@3 at line 3 of Moo/Object.pm # once (7µs+8µs) by Moo::_Utils::BEGIN@11 at line 11 of Moo/_Utils.pm
sub VERSION {
1197µs for ($_[1]) {
12912µs last unless defined && !ref && int != 1;
13 die "Major version specified as $_ - this is strictures version 1";
14 }
15 # disable this since Foo->VERSION(undef) correctly returns the version
16 # and that can happen either if our caller passes undef explicitly or
17 # because the for above autovivified $_[1] - I could make it stop but
18 # it's pointless since we don't want to blow up if the caller does
19 # something valid either.
202454µs235µs
# spent 23µs (11+12) within strictures::BEGIN@20 which was called: # once (11µs+12µs) by Moo::BEGIN@3 at line 20
no warnings 'uninitialized';
# spent 23µs making 1 call to strictures::BEGIN@20 # spent 12µs making 1 call to warnings::unimport
219180µs979µs shift->SUPER::VERSION(@_);
# spent 79µs making 9 calls to UNIVERSAL::VERSION, avg 9µs/call
22}
23
241100nsmy $extra_load_states;
25
26139µs325µsour $Smells_Like_VCS = (-e '.git' || -e '.svn'
# spent 25µs making 3 calls to strictures::CORE:ftis, avg 8µs/call
27 || (-e '../../dist.ini' && (-e '../../.git' || -e '../../.svn')));
28
29
# spent 522µs (147+375) within strictures::import which was called 12 times, avg 44µs/call: # 3 times (33µs+100µs) by Moo::import at line 24 of Moo.pm, avg 44µs/call # once (18µs+42µs) by Method::Generate::Constructor::BEGIN@3 at line 3 of Method/Generate/Constructor.pm # once (18µs+29µs) by Moo::BEGIN@3 at line 3 of Moo.pm # once (11µs+30µs) by Moo::sification::BEGIN@3 at line 3 of Moo/sification.pm # once (12µs+30µs) by Moo::HandleMoose::BEGIN@3 at line 3 of Moo/HandleMoose.pm # once (11µs+29µs) by Sub::Defer::BEGIN@3 at line 3 of Sub/Defer.pm # once (11µs+29µs) by Method::Generate::Accessor::BEGIN@3 at line 3 of Method/Generate/Accessor.pm # once (11µs+29µs) by Sub::Quote::BEGIN@3 at line 3 of Sub/Quote.pm # once (11µs+28µs) by Moo::Object::BEGIN@3 at line 3 of Moo/Object.pm # once (11µs+28µs) by Moo::_Utils::BEGIN@11 at line 11 of Moo/_Utils.pm
sub import {
301215µs12170µs strict->import;
# spent 170µs making 12 calls to strict::import, avg 14µs/call
311219µs12185µs warnings->import(FATAL => 'all');
# spent 185µs making 12 calls to warnings::import, avg 15µs/call
32
33129µs my $extra_tests = do {
34129µs if (exists $ENV{PERL_STRICTURES_EXTRA}) {
35 if (_PERL_LT_5_8_4 and $ENV{PERL_STRICTURES_EXTRA}) {
36 die 'PERL_STRICTURES_EXTRA checks are not available on perls older than 5.8.4: '
37 . "please unset \$ENV{PERL_STRICTURES_EXTRA}\n";
38 }
39 $ENV{PERL_STRICTURES_EXTRA};
40 } elsif (! _PERL_LT_5_8_4) {
411263µs1220µs !!((caller)[1] =~ /^(?:t|xt|lib|blib)/
# spent 20µs making 12 calls to strictures::CORE:match, avg 2µs/call
42 and $Smells_Like_VCS)
43 }
44 };
451240µs if ($extra_tests) {
46 $extra_load_states ||= do {
47
48 my (%rv, @failed);
49 foreach my $mod (qw(indirect multidimensional bareword::filehandles)) {
50 eval "require $mod; \$rv{'$mod'} = 1;" or do {
51 push @failed, $mod;
52
53 # courtesy of the 5.8 require bug
54 # (we do a copy because 5.16.2 at least uses the same read-only
55 # scalars for the qw() list and it doesn't seem worth a $^V check)
56
57 (my $file = $mod) =~ s|::|/|g;
58 delete $INC{"${file}.pm"};
59 };
60 }
61
62 if (@failed) {
63 my $failed = join ' ', @failed;
64 print STDERR <<EOE;
65strictures.pm extra testing active but couldn't load all modules. Missing were:
66
67 $failed
68
69Extra testing is auto-enabled in checkouts only, so if you're the author
70of a strictures-using module you need to run:
71
72 cpan indirect multidimensional bareword::filehandles
73
74but these modules are not required by your users.
75EOE
76 }
77
78 \%rv;
79 };
80
81 indirect->unimport(':fatal') if $extra_load_states->{indirect};
82 multidimensional->unimport if $extra_load_states->{multidimensional};
83 bareword::filehandles->unimport if $extra_load_states->{'bareword::filehandles'};
84 }
85}
86
8717µs1;
88
89__END__
 
# spent 25µs within strictures::CORE:ftis which was called 3 times, avg 8µs/call: # 3 times (25µs+0s) by Moo::BEGIN@3 at line 26, avg 8µs/call
sub strictures::CORE:ftis; # opcode
# spent 20µs within strictures::CORE:match which was called 12 times, avg 2µs/call: # 12 times (20µs+0s) by strictures::import at line 41, avg 2µs/call
sub strictures::CORE:match; # opcode