← Index
NYTProf Performance Profile   « line view »
For /Users/timbo/perl5/perlbrew/perls/perl-5.18.2/bin/perlcritic
  Run on Sat Mar 19 22:12:22 2016
Reported on Sat Mar 19 22:14:10 2016

Filename/Users/timbo/perl5/perlbrew/perls/perl-5.18.2/lib/site_perl/5.18.2/PPI/Token/ArrayIndex.pm
StatementsExecuted 27 statements in 285µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
311112µs150µsPPI::Token::ArrayIndex::::__TOKENIZER__on_charPPI::Token::ArrayIndex::__TOKENIZER__on_char
11115µs27µsPPI::Token::ArrayIndex::::BEGIN@29PPI::Token::ArrayIndex::BEGIN@29
1119µs37µsPPI::Token::ArrayIndex::::BEGIN@32PPI::Token::ArrayIndex::BEGIN@32
1118µs8µsPPI::Token::ArrayIndex::::BEGIN@33PPI::Token::ArrayIndex::BEGIN@33
3114µs4µsPPI::Token::ArrayIndex::::CORE:matchPPI::Token::ArrayIndex::CORE:match (opcode)
1113µs3µsPPI::Token::ArrayIndex::::BEGIN@30PPI::Token::ArrayIndex::BEGIN@30
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package PPI::Token::ArrayIndex;
2
3=pod
4
5=head1 NAME
6
7PPI::Token::ArrayIndex - Token getting the last index for an array
8
9=head1 INHERITANCE
10
11 PPI::Token::ArrayIndex
12 isa PPI::Token
13 isa PPI::Element
14
15=head1 DESCRIPTION
16
17The C<PPI::Token::ArrayIndex> token represents an attempt to get the
18last index of an array, such as C<$#array>.
19
20=head1 METHODS
21
22There are no additional methods beyond those provided by the parent
23L<PPI::Token> and L<PPI::Element> classes.
24
25Got any ideas for methods? Submit a report to rt.cpan.org!
26
27=cut
28
29222µs239µs
# spent 27µs (15+12) within PPI::Token::ArrayIndex::BEGIN@29 which was called: # once (15µs+12µs) by PPI::Token::BEGIN@52 at line 29
use strict;
# spent 27µs making 1 call to PPI::Token::ArrayIndex::BEGIN@29 # spent 12µs making 1 call to strict::import
30219µs13µs
# spent 3µs within PPI::Token::ArrayIndex::BEGIN@30 which was called: # once (3µs+0s) by PPI::Token::BEGIN@52 at line 30
use PPI::Token ();
# spent 3µs making 1 call to PPI::Token::ArrayIndex::BEGIN@30
31
32228µs265µs
# spent 37µs (9+28) within PPI::Token::ArrayIndex::BEGIN@32 which was called: # once (9µs+28µs) by PPI::Token::BEGIN@52 at line 32
use vars qw{$VERSION @ISA};
# spent 37µs making 1 call to PPI::Token::ArrayIndex::BEGIN@32 # spent 28µs making 1 call to vars::import
33
# spent 8µs within PPI::Token::ArrayIndex::BEGIN@33 which was called: # once (8µs+0s) by PPI::Token::BEGIN@52 at line 36
BEGIN {
341300ns $VERSION = '1.215';
3518µs @ISA = 'PPI::Token';
361100µs18µs}
# spent 8µs making 1 call to PPI::Token::ArrayIndex::BEGIN@33
37
- -
42#####################################################################
43# Tokenizer Methods
44
45
# spent 150µs (112+37) within PPI::Token::ArrayIndex::__TOKENIZER__on_char which was called 3 times, avg 50µs/call: # 3 times (112µs+37µs) by PPI::Token::Magic::__TOKENIZER__on_char at line 176 of PPI/Token/Magic.pm, avg 50µs/call
sub __TOKENIZER__on_char {
4631µs my $t = $_[1];
47
48 # Suck in till the end of the arrayindex
4933µs my $line = substr( $t->{line}, $t->{line_cursor} );
50326µs34µs if ( $line =~ /^([\w:']+)/ ) {
# spent 4µs making 3 calls to PPI::Token::ArrayIndex::CORE:match, avg 1µs/call
51357µs $t->{token}->{content} .= $1;
5233µs $t->{line_cursor} += length $1;
53 }
54
55 # End of token
56316µs634µs $t->_finalize_token->__TOKENIZER__on_char( $t );
# spent 25µs making 3 calls to PPI::Token::Whitespace::__TOKENIZER__on_char, avg 8µs/call # spent 8µs making 3 calls to PPI::Tokenizer::_finalize_token, avg 3µs/call
57}
58
5912µs1;
60
61=pod
62
63=head1 SUPPORT
64
65See the L<support section|PPI/SUPPORT> in the main module.
66
67=head1 AUTHOR
68
69Adam Kennedy E<lt>adamk@cpan.orgE<gt>
70
71=head1 COPYRIGHT
72
73Copyright 2001 - 2011 Adam Kennedy.
74
75This program is free software; you can redistribute
76it and/or modify it under the same terms as Perl itself.
77
78The full text of the license can be found in the
79LICENSE file included with this module.
80
81=cut
 
# spent 4µs within PPI::Token::ArrayIndex::CORE:match which was called 3 times, avg 1µs/call: # 3 times (4µs+0s) by PPI::Token::ArrayIndex::__TOKENIZER__on_char at line 50, avg 1µs/call
sub PPI::Token::ArrayIndex::CORE:match; # opcode