← 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/Capture.pm
StatementsExecuted 8 statements in 136µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11112µs23µsPPIx::Regexp::Structure::Capture::::BEGIN@33PPIx::Regexp::Structure::Capture::BEGIN@33
1117µs11µsPPIx::Regexp::Structure::Capture::::BEGIN@34PPIx::Regexp::Structure::Capture::BEGIN@34
1116µs59µsPPIx::Regexp::Structure::Capture::::BEGIN@36PPIx::Regexp::Structure::Capture::BEGIN@36
0000s0sPPIx::Regexp::Structure::Capture::::__PPIX_LEXER__record_capture_numberPPIx::Regexp::Structure::Capture::__PPIX_LEXER__record_capture_number
0000s0sPPIx::Regexp::Structure::Capture::::namePPIx::Regexp::Structure::Capture::name
0000s0sPPIx::Regexp::Structure::Capture::::numberPPIx::Regexp::Structure::Capture::number
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::Capture - Represent capture parentheses.
4
5=head1 SYNOPSIS
6
7 use PPIx::Regexp::Dumper;
8 PPIx::Regexp::Dumper->new( 'qr{(foo)}smx' )
9 ->print();
10
11=head1 INHERITANCE
12
13C<PPIx::Regexp::Structure::Capture> is a
14L<PPIx::Regexp::Structure|PPIx::Regexp::Structure>.
15
16C<PPIx::Regexp::Structure::Capture> is the parent of
17L<PPIx::Regexp::Structure::NamedCapture|PPIx::Regexp::Structure::NamedCapture>.
18
19=head1 DESCRIPTION
20
21This class represents capture parentheses.
22
23=head1 METHODS
24
25This class provides the following public methods. Methods not documented
26here are private, and unsupported in the sense that the author reserves
27the right to change or remove them without notice.
28
29=cut
30
31package PPIx::Regexp::Structure::Capture;
32
33219µs234µs
# spent 23µs (12+12) within PPIx::Regexp::Structure::Capture::BEGIN@33 which was called: # once (12µs+12µs) by PPIx::Regexp::Lexer::BEGIN@48 at line 33
use strict;
# spent 23µs making 1 call to PPIx::Regexp::Structure::Capture::BEGIN@33 # spent 12µs making 1 call to strict::import
34220µs216µs
# spent 11µs (7+4) within PPIx::Regexp::Structure::Capture::BEGIN@34 which was called: # once (7µs+4µs) by PPIx::Regexp::Lexer::BEGIN@48 at line 34
use warnings;
# spent 11µs making 1 call to PPIx::Regexp::Structure::Capture::BEGIN@34 # spent 4µs making 1 call to warnings::import
35
36295µs2111µs
# spent 59µs (6+52) within PPIx::Regexp::Structure::Capture::BEGIN@36 which was called: # once (6µs+52µs) by PPIx::Regexp::Lexer::BEGIN@48 at line 36
use base qw{ PPIx::Regexp::Structure };
# spent 59µs making 1 call to PPIx::Regexp::Structure::Capture::BEGIN@36 # spent 52µs making 1 call to base::import
37
381600nsour $VERSION = '0.036';
39
40=head2 name
41
42 my $name = $element->name();
43
44This method returns the name of the capture buffer. Unless the buffer is
45actually named, this will be C<undef>.
46
47=cut
48
49sub name {
50 return;
51}
52
53=head2 number
54
55 my $number = $element->number()
56
57This method returns the number of the capture buffer. Note that named
58buffers have numbers also.
59
60=cut
61
62sub number {
63 my ( $self ) = @_;
64 return $self->{number};
65}
66
67# Called by the lexer to record the capture number.
68sub __PPIX_LEXER__record_capture_number {
69 my ( $self, $number ) = @_;
70 $self->{number} = $number++;
71 return $self->SUPER::__PPIX_LEXER__record_capture_number( $number );
72}
73
7412µs1;
75
76__END__