← 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/End.pm
StatementsExecuted 7777 statements in 14.3ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1834119.00ms14.1msPPI::Token::End::::__TOKENIZER__on_line_startPPI::Token::End::__TOKENIZER__on_line_start
183411794µs794µsPPI::Token::End::::CORE:matchPPI::Token::End::CORE:match (opcode)
11116µs33µsPPI::Token::End::::BEGIN@43PPI::Token::End::BEGIN@43
11111µs11µsPPI::Token::End::::BEGIN@47PPI::Token::End::BEGIN@47
1118µs47µsPPI::Token::End::::BEGIN@46PPI::Token::End::BEGIN@46
1114µs4µsPPI::Token::End::::BEGIN@44PPI::Token::End::BEGIN@44
0000s0sPPI::Token::End::::__TOKENIZER__on_charPPI::Token::End::__TOKENIZER__on_char
0000s0sPPI::Token::End::::significantPPI::Token::End::significant
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::End;
2
3=pod
4
5=head1 NAME
6
7PPI::Token::End - Completely useless content after the __END__ tag
8
9=head1 INHERITANCE
10
11 PPI::Token::End
12 isa PPI::Token
13 isa PPI::Element
14
15=head1 DESCRIPTION
16
17If you've read L<PPI::Token::Whitespace>, you should understand by now
18the concept of documents "floating in a sea of PPI::Token::Whitespace".
19
20Well it doesn't after the __END__ tag.
21
22Once you __END__, it's all over. Anything after that tag isn't even fit
23to be called whitespace. It just simply doesn't exist as far as perl
24(the interpreter) is concerned.
25
26That's not to say there isn't useful content. Most often people use
27the __END__ tag to hide POD content, so that perl never has to see it,
28and presumably providing some small speed up.
29
30That's fine. PPI likes POD. Any POD after the __END__ tag is parsed
31into valid L<PPI::Token::Pod> tags as normal. B<This> class, on the
32other hand, is for "what's after __END__ when it isn't POD".
33
34Basically, the completely worthless bits of the file :)
35
36=head1 METHODS
37
38This class has no method beyond what is provided by its L<PPI::Token> and
39L<PPI::Element> parent classes.
40
41=cut
42
43227µs250µs
# spent 33µs (16+17) within PPI::Token::End::BEGIN@43 which was called: # once (16µs+17µs) by PPI::Token::BEGIN@73 at line 43
use strict;
# spent 33µs making 1 call to PPI::Token::End::BEGIN@43 # spent 17µs making 1 call to strict::import
44226µs14µs
# spent 4µs within PPI::Token::End::BEGIN@44 which was called: # once (4µs+0s) by PPI::Token::BEGIN@73 at line 44
use PPI::Token ();
# spent 4µs making 1 call to PPI::Token::End::BEGIN@44
45
46238µs286µs
# spent 47µs (8+39) within PPI::Token::End::BEGIN@46 which was called: # once (8µs+39µs) by PPI::Token::BEGIN@73 at line 46
use vars qw{$VERSION @ISA};
# spent 47µs making 1 call to PPI::Token::End::BEGIN@46 # spent 39µs making 1 call to vars::import
47
# spent 11µs within PPI::Token::End::BEGIN@47 which was called: # once (11µs+0s) by PPI::Token::BEGIN@73 at line 50
BEGIN {
481500ns $VERSION = '1.215';
49112µs @ISA = 'PPI::Token';
501162µs111µs}
# spent 11µs making 1 call to PPI::Token::End::BEGIN@47
51
- -
56#####################################################################
57# Tokenizer Methods
58
59### XS -> PPI/XS.xs:_PPI_Token_End__significant 0.900+
60sub significant { '' }
61
62sub __TOKENIZER__on_char { 1 }
63
64
# spent 14.1ms (9.00+5.05) within PPI::Token::End::__TOKENIZER__on_line_start which was called 1834 times, avg 8µs/call: # 1834 times (9.00ms+5.05ms) by PPI::Tokenizer::_process_next_line at line 499 of PPI/Tokenizer.pm, avg 8µs/call
sub __TOKENIZER__on_line_start {
651834318µs my $t = $_[1];
66
67 # Can we classify the entire line in one go
6818343.83ms1834794µs if ( $t->{line} =~ /^=(\w+)/ ) {
# spent 794µs making 1834 calls to PPI::Token::End::CORE:match, avg 433ns/call
69 # A Pod tag... change to pod mode
70144229µs1441.94ms $t->_new_token( 'Pod', $t->{line} );
# spent 1.94ms making 144 calls to PPI::Tokenizer::_new_token, avg 13µs/call
71144239µs unless ( $1 eq 'cut' ) {
72 # Normal start to pod
73 $t->{class} = 'PPI::Token::Pod';
74 }
75
76 # This is an error, but one we'll ignore
77 # Don't go into Pod mode, since =cut normally
78 # signals the end of Pod mode
79 } else {
8016901.76ms if ( defined $t->{token} ) {
81 # Add to existing token
82 $t->{token}->{content} .= $t->{line};
83 } else {
84288384µs2882.32ms $t->_new_token( 'End', $t->{line} );
# spent 2.32ms making 288 calls to PPI::Tokenizer::_new_token, avg 8µs/call
85 }
86 }
87
8818347.29ms 0;
89}
90
9113µs1;
92
93=pod
94
95=head1 SUPPORT
96
97See the L<support section|PPI/SUPPORT> in the main module.
98
99=head1 AUTHOR
100
101Adam Kennedy E<lt>adamk@cpan.orgE<gt>
102
103=head1 COPYRIGHT
104
105Copyright 2001 - 2011 Adam Kennedy.
106
107This program is free software; you can redistribute
108it and/or modify it under the same terms as Perl itself.
109
110The full text of the license can be found in the
111LICENSE file included with this module.
112
113=cut
 
# spent 794µs within PPI::Token::End::CORE:match which was called 1834 times, avg 433ns/call: # 1834 times (794µs+0s) by PPI::Token::End::__TOKENIZER__on_line_start at line 68, avg 433ns/call
sub PPI::Token::End::CORE:match; # opcode