← 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:14 2016

Filename/Users/timbo/perl5/perlbrew/perls/perl-5.18.2/lib/site_perl/5.18.2/PPIx/Regexp/Token/Unknown.pm
StatementsExecuted 10 statements in 197µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11112µs24µsPPIx::Regexp::Token::Unknown::::BEGIN@35PPIx::Regexp::Token::Unknown::BEGIN@35
1119µs42µsPPIx::Regexp::Token::Unknown::::BEGIN@62PPIx::Regexp::Token::Unknown::BEGIN@62
1117µs12µsPPIx::Regexp::Token::Unknown::::BEGIN@36PPIx::Regexp::Token::Unknown::BEGIN@36
1117µs61µsPPIx::Regexp::Token::Unknown::::BEGIN@38PPIx::Regexp::Token::Unknown::BEGIN@38
0000s0sPPIx::Regexp::Token::Unknown::::__PPIX_LEXER__finalizePPIx::Regexp::Token::Unknown::__PPIX_LEXER__finalize
0000s0sPPIx::Regexp::Token::Unknown::::__PPIX_TOKEN__post_makePPIx::Regexp::Token::Unknown::__PPIX_TOKEN__post_make
0000s0sPPIx::Regexp::Token::Unknown::::can_be_quantifiedPPIx::Regexp::Token::Unknown::can_be_quantified
0000s0sPPIx::Regexp::Token::Unknown::::ordinalPPIx::Regexp::Token::Unknown::ordinal
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1=head1 NAME
2
3PPIx::Regexp::Token::Unknown - Represent an unknown token
4
5=head1 SYNOPSIS
6
7 use PPIx::Regexp::Dumper;
8 PPIx::Regexp::Dumper->new( 'xyzzy' )
9 ->print();
10
11=head1 INHERITANCE
12
13C<PPIx::Regexp::Token::Unknown> is a
14L<PPIx::Regexp::Token|PPIx::Regexp::Token>.
15
16C<PPIx::Regexp::Token::Unknown> has no descendants.
17
18=head1 DESCRIPTION
19
20This token represents something that could not be identified by the
21tokenizer. Sometimes the lexer can fix these up, but the presence of one
22of these in a finished parse represents something in the regular
23expression that was not understood.
24
25=head1 METHODS
26
27This class provides the following public methods. Methods not documented
28here are private, and unsupported in the sense that the author reserves
29the right to change or remove them without notice.
30
31=cut
32
33package PPIx::Regexp::Token::Unknown;
34
35221µs236µs
# spent 24µs (12+12) within PPIx::Regexp::Token::Unknown::BEGIN@35 which was called: # once (12µs+12µs) by PPIx::Regexp::Tokenizer::BEGIN@40 at line 35
use strict;
# spent 24µs making 1 call to PPIx::Regexp::Token::Unknown::BEGIN@35 # spent 12µs making 1 call to strict::import
36221µs217µs
# spent 12µs (7+5) within PPIx::Regexp::Token::Unknown::BEGIN@36 which was called: # once (7µs+5µs) by PPIx::Regexp::Tokenizer::BEGIN@40 at line 36
use warnings;
# spent 12µs making 1 call to PPIx::Regexp::Token::Unknown::BEGIN@36 # spent 5µs making 1 call to warnings::import
37
38285µs2114µs
# spent 61µs (7+54) within PPIx::Regexp::Token::Unknown::BEGIN@38 which was called: # once (7µs+54µs) by PPIx::Regexp::Tokenizer::BEGIN@40 at line 38
use base qw{ PPIx::Regexp::Token };
# spent 61µs making 1 call to PPIx::Regexp::Token::Unknown::BEGIN@38 # spent 54µs making 1 call to base::import
39
401600nsour $VERSION = '0.036';
41
42# Return true if the token can be quantified, and false otherwise
43sub can_be_quantified { return };
44
45=head2 ordinal
46
47This method returns the results of the ord built-in on the content
48(meaning, of course, the first character of the content). No attempt is
49made to interpret the content, since after all this B<is> the unknown
50token.
51
52=cut
53
54sub ordinal {
55 my ( $self ) = @_;
56 return ord $self->content();
57}
58
59sub __PPIX_TOKEN__post_make {
60 my ( $self, $tokenizer, $arg ) = @_;
61 my $msg = $arg->{error};
62268µs275µs
# spent 42µs (9+33) within PPIx::Regexp::Token::Unknown::BEGIN@62 which was called: # once (9µs+33µs) by PPIx::Regexp::Tokenizer::BEGIN@40 at line 62
use Carp;
# spent 42µs making 1 call to PPIx::Regexp::Token::Unknown::BEGIN@62 # spent 33µs making 1 call to Exporter::import
63 defined $msg
64 or Carp::cluck( 'Making unknown token with no error message' );
65 defined $msg
66 or $msg = 'Unspecified error';
67 $self->{error} = $msg;
68 return;
69}
70
71# Since the lexer does not count these on the way in (because it needs
72# the liberty to rebless them into a known class if it figures out what
73# is going on) we count them as failures at the finalization step.
74sub __PPIX_LEXER__finalize {
75 return 1;
76}
77
7812µs1;
79
80__END__