← 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/NamedCapture.pm
StatementsExecuted 10 statements in 131µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11112µs24µsPPIx::Regexp::Structure::NamedCapture::::BEGIN@37PPIx::Regexp::Structure::NamedCapture::BEGIN@37
1118µs38µsPPIx::Regexp::Structure::NamedCapture::::BEGIN@40PPIx::Regexp::Structure::NamedCapture::BEGIN@40
1117µs11µsPPIx::Regexp::Structure::NamedCapture::::BEGIN@38PPIx::Regexp::Structure::NamedCapture::BEGIN@38
1117µs59µsPPIx::Regexp::Structure::NamedCapture::::BEGIN@42PPIx::Regexp::Structure::NamedCapture::BEGIN@42
0000s0sPPIx::Regexp::Structure::NamedCapture::::namePPIx::Regexp::Structure::NamedCapture::name
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::NamedCapture - Represent a named capture
4
5=head1 SYNOPSIS
6
7 use PPIx::Regexp::Dumper;
8 PPIx::Regexp::Dumper->new( 'qr{(?<foo>foo)}smx' )
9 ->print();
10
11=head1 INHERITANCE
12
13C<PPIx::Regexp::Structure::NamedCapture> is a
14L<PPIx::Regexp::Structure::Capture|PPIx::Regexp::Structure::Capture>.
15
16C<PPIx::Regexp::Structure::NamedCapture> has no descendants.
17
18=head1 DESCRIPTION
19
20This class represents a named capture. Its content will be something
21like one of the following:
22
23 (?<NAME> ... )
24 (?'NAME' ... )
25 (?P<NAME> ... )
26
27=head1 METHODS
28
29This class provides the following public methods. Methods not documented
30here are private, and unsupported in the sense that the author reserves
31the right to change or remove them without notice.
32
33=cut
34
35package PPIx::Regexp::Structure::NamedCapture;
36
37219µs235µs
# spent 24µs (12+11) within PPIx::Regexp::Structure::NamedCapture::BEGIN@37 which was called: # once (12µs+11µs) by PPIx::Regexp::Lexer::BEGIN@53 at line 37
use strict;
# spent 24µs making 1 call to PPIx::Regexp::Structure::NamedCapture::BEGIN@37 # spent 11µs making 1 call to strict::import
38218µs216µs
# spent 11µs (7+4) within PPIx::Regexp::Structure::NamedCapture::BEGIN@38 which was called: # once (7µs+4µs) by PPIx::Regexp::Lexer::BEGIN@53 at line 38
use warnings;
# spent 11µs making 1 call to PPIx::Regexp::Structure::NamedCapture::BEGIN@38 # spent 4µs making 1 call to warnings::import
39
40225µs269µs
# spent 38µs (8+31) within PPIx::Regexp::Structure::NamedCapture::BEGIN@40 which was called: # once (8µs+31µs) by PPIx::Regexp::Lexer::BEGIN@53 at line 40
use Carp;
# spent 38µs making 1 call to PPIx::Regexp::Structure::NamedCapture::BEGIN@40 # spent 31µs making 1 call to Exporter::import
41
42266µs2112µs
# spent 59µs (7+52) within PPIx::Regexp::Structure::NamedCapture::BEGIN@42 which was called: # once (7µs+52µs) by PPIx::Regexp::Lexer::BEGIN@53 at line 42
use base qw{ PPIx::Regexp::Structure::Capture };
# spent 59µs making 1 call to PPIx::Regexp::Structure::NamedCapture::BEGIN@42 # spent 52µs making 1 call to base::import
43
441600nsour $VERSION = '0.036';
45
46=head2 name
47
48 my $name = $element->name();
49
50This method returns the name of the capture.
51
52=cut
53
54sub name {
55 my ( $self ) = @_;
56 my $type = $self->type()
57 or croak 'Programming error - ', __PACKAGE__, ' without type object';
58 return $type->name();
59}
60
6112µs1;
62
63__END__