← 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/Recursion.pm
StatementsExecuted 13 statements in 382µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11128µs28µsPPIx::Regexp::Token::Recursion::::CORE:regcompPPIx::Regexp::Token::Recursion::CORE:regcomp (opcode)
11121µs53µsPPIx::Regexp::Token::Recursion::::__PPIX_TOKEN__recognizePPIx::Regexp::Token::Recursion::__PPIX_TOKEN__recognize
11119µs39µsPPIx::Regexp::Token::Recursion::::BEGIN@31PPIx::Regexp::Token::Recursion::BEGIN@31
11112µs19µsPPIx::Regexp::Token::Recursion::::BEGIN@32PPIx::Regexp::Token::Recursion::BEGIN@32
11111µs40µsPPIx::Regexp::Token::Recursion::::BEGIN@37PPIx::Regexp::Token::Recursion::BEGIN@37
11111µs105µsPPIx::Regexp::Token::Recursion::::BEGIN@34PPIx::Regexp::Token::Recursion::BEGIN@34
11111µs48µsPPIx::Regexp::Token::Recursion::::BEGIN@36PPIx::Regexp::Token::Recursion::BEGIN@36
3114µs4µsPPIx::Regexp::Token::Recursion::::CORE:qrPPIx::Regexp::Token::Recursion::CORE:qr (opcode)
0000s0sPPIx::Regexp::Token::Recursion::::perl_version_introducedPPIx::Regexp::Token::Recursion::perl_version_introduced
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::Recursion - Represent a recursion
4
5=head1 SYNOPSIS
6
7 use PPIx::Regexp::Dumper;
8 PPIx::Regexp::Dumper->new( 'qr{(foo(?1)?)}smx' )
9 ->print();
10
11=head1 INHERITANCE
12
13C<PPIx::Regexp::Token::Recursion> is a
14L<PPIx::Regexp::Token::Reference|PPIx::Regexp::Token::Reference>.
15
16C<PPIx::Regexp::Token::Recursion> has no descendants.
17
18=head1 DESCRIPTION
19
20This class represents a recursion to a named or numbered capture.
21
22=head1 METHODS
23
24This class provides no public methods beyond those provided by its
25superclass.
26
27=cut
28
29package PPIx::Regexp::Token::Recursion;
30
31233µs259µs
# spent 39µs (19+20) within PPIx::Regexp::Token::Recursion::BEGIN@31 which was called: # once (19µs+20µs) by PPIx::Regexp::Token::Structure::BEGIN@54 at line 31
use strict;
# spent 39µs making 1 call to PPIx::Regexp::Token::Recursion::BEGIN@31 # spent 20µs making 1 call to strict::import
32234µs227µs
# spent 19µs (12+8) within PPIx::Regexp::Token::Recursion::BEGIN@32 which was called: # once (12µs+8µs) by PPIx::Regexp::Token::Structure::BEGIN@54 at line 32
use warnings;
# spent 19µs making 1 call to PPIx::Regexp::Token::Recursion::BEGIN@32 # spent 8µs making 1 call to warnings::import
33
34242µs2105µs
# spent 105µs (11+94) within PPIx::Regexp::Token::Recursion::BEGIN@34 which was called: # once (11µs+94µs) by PPIx::Regexp::Token::Structure::BEGIN@54 at line 34
use base qw{ PPIx::Regexp::Token::Reference };
# spent 105µs making 1 call to PPIx::Regexp::Token::Recursion::BEGIN@34 # spent 94µs making 1 call to base::import, recursion: max depth 1, sum of overlapping time 94µs
35
36235µs285µs
# spent 48µs (11+37) within PPIx::Regexp::Token::Recursion::BEGIN@36 which was called: # once (11µs+37µs) by PPIx::Regexp::Token::Structure::BEGIN@54 at line 36
use Carp qw{ confess };
# spent 48µs making 1 call to PPIx::Regexp::Token::Recursion::BEGIN@36 # spent 37µs making 1 call to Exporter::import
372180µs270µs
# spent 40µs (11+29) within PPIx::Regexp::Token::Recursion::BEGIN@37 which was called: # once (11µs+29µs) by PPIx::Regexp::Token::Structure::BEGIN@54 at line 37
use PPIx::Regexp::Constant qw{ RE_CAPTURE_NAME };
# spent 40µs making 1 call to PPIx::Regexp::Token::Recursion::BEGIN@37 # spent 29µs making 1 call to Exporter::import
38
3911µsour $VERSION = '0.036';
40
41# Return true if the token can be quantified, and false otherwise
42# sub can_be_quantified { return };
43
44sub perl_version_introduced {
45 return '5.009005';
46}
47
48# This must be implemented by tokens which do not recognize themselves.
49# The return is a list of list references. Each list reference must
50# contain a regular expression that recognizes the token, and optionally
51# a reference to a hash to pass to make_token as the class-specific
52# arguments. The regular expression MUST be anchored to the beginning of
53# the string.
54
# spent 53µs (21+32) within PPIx::Regexp::Token::Recursion::__PPIX_TOKEN__recognize which was called: # once (21µs+32µs) by base::import at line 102 of PPIx/Regexp/Token/Structure.pm
sub __PPIX_TOKEN__recognize {
55 return (
56 [ qr{ \A \( \? (?: ( [-+]? \d+ )) \) }smx, { is_named => 0 } ],
57 [ qr{ \A \( \? (?: R) \) }smx,
58 { is_named => 0, capture => '0' } ],
59155µs432µs [ qr{ \A \( \? (?: & | P> ) ( @{[ RE_CAPTURE_NAME ]} ) \) }smxo,
# spent 28µs making 1 call to PPIx::Regexp::Token::Recursion::CORE:regcomp # spent 4µs making 3 calls to PPIx::Regexp::Token::Recursion::CORE:qr, avg 1µs/call
60 { is_named => 1 } ],
61 );
62}
63
6414µs1;
65
66__END__
 
# spent 4µs within PPIx::Regexp::Token::Recursion::CORE:qr which was called 3 times, avg 1µs/call: # 3 times (4µs+0s) by PPIx::Regexp::Token::Recursion::__PPIX_TOKEN__recognize at line 59, avg 1µs/call
sub PPIx::Regexp::Token::Recursion::CORE:qr; # opcode
# spent 28µs within PPIx::Regexp::Token::Recursion::CORE:regcomp which was called: # once (28µs+0s) by PPIx::Regexp::Token::Recursion::__PPIX_TOKEN__recognize at line 59
sub PPIx::Regexp::Token::Recursion::CORE:regcomp; # opcode