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

Filename/Users/timbo/perl5/perlbrew/perls/perl-5.18.2/lib/site_perl/5.18.2/PPIx/Regexp/Structure/Code.pm
StatementsExecuted 8 statements in 136µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11112µs33µsPPIx::Regexp::Structure::Code::::BEGIN@37PPIx::Regexp::Structure::Code::BEGIN@37
11111µs15µsPPIx::Regexp::Structure::Code::::BEGIN@38PPIx::Regexp::Structure::Code::BEGIN@38
1117µs59µsPPIx::Regexp::Structure::Code::::BEGIN@40PPIx::Regexp::Structure::Code::BEGIN@40
0000s0sPPIx::Regexp::Structure::Code::::__PPIX_LEXER__finalizePPIx::Regexp::Structure::Code::__PPIX_LEXER__finalize
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::Structure::Code - Represent one of the code structures.
4
5=head1 SYNOPSIS
6
7 use PPIx::Regexp::Dumper;
8 PPIx::Regexp::Dumper->new( 'qr{(?{print "hello sailor\n")}smx' )
9 ->print();
10
11=head1 INHERITANCE
12
13C<PPIx::Regexp::Structure::Code> is a
14L<PPIx::Regexp::Structure|PPIx::Regexp::Structure>.
15
16C<PPIx::Regexp::Structure::Code> has no descendants.
17
18=head1 DESCRIPTION
19
20This class represents one of the code structures, either
21
22 (?{ code })
23
24or
25
26 (??{ code })
27
28=head1 METHODS
29
30This class provides no public methods beyond those provided by its
31superclass.
32
33=cut
34
35package PPIx::Regexp::Structure::Code;
36
37220µs254µs
# spent 33µs (12+21) within PPIx::Regexp::Structure::Code::BEGIN@37 which was called: # once (12µs+21µs) by PPIx::Regexp::Lexer::BEGIN@47 at line 37
use strict;
# spent 33µs making 1 call to PPIx::Regexp::Structure::Code::BEGIN@37 # spent 21µs making 1 call to strict::import
38221µs220µs
# spent 15µs (11+4) within PPIx::Regexp::Structure::Code::BEGIN@38 which was called: # once (11µs+4µs) by PPIx::Regexp::Lexer::BEGIN@47 at line 38
use warnings;
# spent 15µs making 1 call to PPIx::Regexp::Structure::Code::BEGIN@38 # spent 4µs making 1 call to warnings::import
39
40292µs2111µs
# spent 59µs (7+52) within PPIx::Regexp::Structure::Code::BEGIN@40 which was called: # once (7µs+52µs) by PPIx::Regexp::Lexer::BEGIN@47 at line 40
use base qw{ PPIx::Regexp::Structure };
# spent 59µs making 1 call to PPIx::Regexp::Structure::Code::BEGIN@40 # spent 52µs making 1 call to base::import
41
421600nsour $VERSION = '0.036';
43
44# The only child of this structure should be a single
45# PPIx::Regexp::Token::Code. Anything else gets turned into the
46# appropriate ::Unknown object.
47sub __PPIX_LEXER__finalize {
48 my ( $self ) = @_;
49
50 my $count;
51 my $errors = 0;
52
53 foreach my $kid ( $self->children() ) {
54
55 if ( $kid->isa( 'PPIx::Regexp::Token::Code' ) ) {
56 $count++
57 or next;
58 $errors++;
59 $kid->__error(
60 'Code structure can contain only one code token' );
61 } else {
62
63 $errors++;
64
65 $kid->__error(
66 'Code structure may not contain a ' . ref $kid );
67 }
68
69 }
70 return $errors;
71}
72
7312µs1;
74
75__END__