Filename | /Users/timbo/perl5/perlbrew/perls/perl-5.18.2/lib/site_perl/5.18.2/PPI/Structure/For.pm |
Statements | Executed 1648 statements in 10.2ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
819 | 22 | 8 | 2.72ms | 3.67ms | isa | PPI::Structure::For::
1 | 1 | 1 | 15µs | 43µs | BEGIN@39 | PPI::Structure::For::
1 | 1 | 1 | 12µs | 24µs | BEGIN@36 | PPI::Structure::For::
1 | 1 | 1 | 8µs | 8µs | BEGIN@40 | PPI::Structure::For::
1 | 1 | 1 | 3µs | 3µs | BEGIN@37 | PPI::Structure::For::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package PPI::Structure::For; | ||||
2 | |||||
3 | =pod | ||||
4 | |||||
5 | =head1 NAME | ||||
6 | |||||
7 | PPI::Structure::For - Circular braces for a for expression | ||||
8 | |||||
9 | =head1 SYNOPSIS | ||||
10 | |||||
11 | for ( var $i = 0; $i < $max; $i++ ) { | ||||
12 | ... | ||||
13 | } | ||||
14 | |||||
15 | =head1 INHERITANCE | ||||
16 | |||||
17 | PPI::Structure::For | ||||
18 | isa PPI::Structure | ||||
19 | isa PPI::Node | ||||
20 | isa PPI::Element | ||||
21 | |||||
22 | =head1 DESCRIPTION | ||||
23 | |||||
24 | C<PPI::Structure::For> is the class used for circular braces that | ||||
25 | contain the three part C<for> expression. | ||||
26 | |||||
27 | =head1 METHODS | ||||
28 | |||||
29 | C<PPI::Structure::For> has no methods beyond those provided by the | ||||
30 | standard L<PPI::Structure>, L<PPI::Node> and L<PPI::Element> methods. | ||||
31 | |||||
32 | Got any ideas for methods? Submit a report to rt.cpan.org! | ||||
33 | |||||
34 | =cut | ||||
35 | |||||
36 | 2 | 22µs | 2 | 35µs | # spent 24µs (12+12) within PPI::Structure::For::BEGIN@36 which was called:
# once (12µs+12µs) by PPI::Structure::BEGIN@107 at line 36 # spent 24µs making 1 call to PPI::Structure::For::BEGIN@36
# spent 12µs making 1 call to strict::import |
37 | 2 | 19µs | 1 | 3µs | # spent 3µs within PPI::Structure::For::BEGIN@37 which was called:
# once (3µs+0s) by PPI::Structure::BEGIN@107 at line 37 # spent 3µs making 1 call to PPI::Structure::For::BEGIN@37 |
38 | |||||
39 | 2 | 27µs | 2 | 70µs | # spent 43µs (15+27) within PPI::Structure::For::BEGIN@39 which was called:
# once (15µs+27µs) by PPI::Structure::BEGIN@107 at line 39 # spent 43µs making 1 call to PPI::Structure::For::BEGIN@39
# spent 27µs making 1 call to vars::import |
40 | # spent 8µs within PPI::Structure::For::BEGIN@40 which was called:
# once (8µs+0s) by PPI::Structure::BEGIN@107 at line 43 | ||||
41 | 1 | 300ns | $VERSION = '1.215'; | ||
42 | 1 | 8µs | @ISA = 'PPI::Structure'; | ||
43 | 1 | 71µs | 1 | 8µs | } # spent 8µs making 1 call to PPI::Structure::For::BEGIN@40 |
44 | |||||
45 | # Highly special custom isa method that will continue to respond | ||||
46 | # positively to ->isa('PPI::Structure::ForLoop') but warns. | ||||
47 | 1 | 300ns | my $has_warned = 0; | ||
48 | # spent 3.67ms (2.72+949µs) within PPI::Structure::For::isa which was called 819 times, avg 4µs/call:
# 190 times (787µs+258µs) by PPI::Lexer::_statement at line 420 of PPI/Lexer.pm, avg 6µs/call
# 184 times (521µs+215µs) by PPI::Lexer::_statement at line 577 of PPI/Lexer.pm, avg 4µs/call
# 95 times (297µs+116µs) by PPI::Lexer::_statement at line 459 of PPI/Lexer.pm, avg 4µs/call
# 92 times (275µs+110µs) by PPI::Lexer::_statement at line 567 of PPI/Lexer.pm, avg 4µs/call
# 92 times (259µs+90µs) by PPI::Lexer::_statement at line 572 of PPI/Lexer.pm, avg 4µs/call
# 89 times (316µs+78µs) by PPI::Lexer::_lex_structure at line 1366 of PPI/Lexer.pm, avg 4µs/call
# 12 times (48µs+10µs) by PPI::Node::find at line 388 of PPI/Node.pm, avg 5µs/call
# 12 times (38µs+8µs) by PPI::Node::find at line 392 of PPI/Node.pm, avg 4µs/call
# 8 times (31µs+9µs) by PPI::Statement::Compound::type at line 205 of PPI/Statement/Compound.pm, avg 5µs/call
# 8 times (23µs+9µs) by PPI::Statement::Compound::type at line 210 of PPI/Statement/Compound.pm, avg 4µs/call
# 4 times (12µs+4µs) by Perl::Critic::Utils::is_hash_key at line 718 of Perl/Critic/Utils.pm, avg 4µs/call
# 3 times (9µs+12µs) by PPI::Node::__ANON__[(eval 1535)[/Users/timbo/perl5/perlbrew/perls/perl-5.18.2/lib/site_perl/5.18.2/PPI/Node.pm:654]:4] or PPI::Node::__ANON__[(eval 2116)[/Users/timbo/perl5/perlbrew/perls/perl-5.18.2/lib/site_perl/5.18.2/PPI/Node.pm:654]:4] or PPI::Node::__ANON__[(eval 463)[/Users/timbo/perl5/perlbrew/perls/perl-5.18.2/lib/site_perl/5.18.2/PPI/Node.pm:654]:4] at line 2 of (eval 449)[PPI/Node.pm:654], avg 7µs/call
# 3 times (16µs+4µs) by Perl::Critic::Document::_is_a_version_statement at line 495 of Perl/Critic/Document.pm, avg 6µs/call
# 3 times (14µs+3µs) by Perl::Critic::Policy::Subroutines::ProhibitNestedSubs::__ANON__[/Users/timbo/perl5/perlbrew/perls/perl-5.18.2/lib/site_perl/5.18.2/Perl/Critic/Policy/Subroutines/ProhibitNestedSubs.pm:46] at line 44 of Perl/Critic/Policy/Subroutines/ProhibitNestedSubs.pm, avg 6µs/call
# 3 times (11µs+3µs) by PPI::Node::__ANON__[(eval 1534)[/Users/timbo/perl5/perlbrew/perls/perl-5.18.2/lib/site_perl/5.18.2/PPI/Node.pm:654]:4] or PPI::Node::__ANON__[(eval 2115)[/Users/timbo/perl5/perlbrew/perls/perl-5.18.2/lib/site_perl/5.18.2/PPI/Node.pm:654]:4] or PPI::Node::__ANON__[(eval 462)[/Users/timbo/perl5/perlbrew/perls/perl-5.18.2/lib/site_perl/5.18.2/PPI/Node.pm:654]:4] at line 2 of (eval 448)[PPI/Node.pm:654], avg 5µs/call
# 3 times (10µs+4µs) by Perl::Critic::Utils::_is_followed_by_parens at line 736 of Perl/Critic/Utils.pm, avg 5µs/call
# 3 times (9µs+4µs) by PPI::Lexer::_curly at line 1199 of PPI/Lexer.pm, avg 4µs/call
# 3 times (9µs+3µs) by PPI::Lexer::_curly at line 1207 of PPI/Lexer.pm, avg 4µs/call
# 3 times (9µs+3µs) by Perl::Critic::Utils::is_hash_key at line 724 of Perl/Critic/Utils.pm, avg 4µs/call
# 3 times (8µs+2µs) by PPI::Node::find_first at line 445 of PPI/Node.pm, avg 4µs/call
# 3 times (9µs+2µs) by PPI::Lexer::_continues at line 805 of PPI/Lexer.pm, avg 4µs/call
# 3 times (8µs+2µs) by PPI::Node::find_first at line 449 of PPI/Node.pm, avg 3µs/call | ||||
49 | 819 | 162µs | if ( $_[1] and $_[1] eq 'PPI::Structure::ForLoop' ) { | ||
50 | unless ( $has_warned ) { | ||||
51 | warn("PPI::Structure::ForLoop has been deprecated"); | ||||
52 | $has_warned = 1; | ||||
53 | } | ||||
54 | return 1; | ||||
55 | } | ||||
56 | 819 | 9.85ms | 819 | 950µs | return shift->SUPER::isa(@_); # spent 950µs making 819 calls to UNIVERSAL::isa, avg 1µs/call |
57 | } | ||||
58 | |||||
59 | 1 | 2µs | 1; | ||
60 | |||||
61 | =pod | ||||
62 | |||||
63 | =head1 SUPPORT | ||||
64 | |||||
65 | See the L<support section|PPI/SUPPORT> in the main module. | ||||
66 | |||||
67 | =head1 AUTHOR | ||||
68 | |||||
69 | Adam Kennedy E<lt>adamk@cpan.orgE<gt> | ||||
70 | |||||
71 | =head1 COPYRIGHT | ||||
72 | |||||
73 | Copyright 2001 - 2011 Adam Kennedy. | ||||
74 | |||||
75 | This program is free software; you can redistribute | ||||
76 | it and/or modify it under the same terms as Perl itself. | ||||
77 | |||||
78 | The full text of the license can be found in the | ||||
79 | LICENSE file included with this module. | ||||
80 | |||||
81 | =cut |