← 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/Modifier.pm
StatementsExecuted 8 statements in 125µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11111µs22µsPPIx::Regexp::Structure::Modifier::::BEGIN@33PPIx::Regexp::Structure::Modifier::BEGIN@33
1117µs12µsPPIx::Regexp::Structure::Modifier::::BEGIN@34PPIx::Regexp::Structure::Modifier::BEGIN@34
1116µs57µsPPIx::Regexp::Structure::Modifier::::BEGIN@36PPIx::Regexp::Structure::Modifier::BEGIN@36
0000s0sPPIx::Regexp::Structure::Modifier::::__ducktype_modifier_assertedPPIx::Regexp::Structure::Modifier::__ducktype_modifier_asserted
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::Modifier - Represent modifying parentheses
4
5=head1 SYNOPSIS
6
7 use PPIx::Regexp::Dumper;
8 PPIx::Regexp::Dumper->new( 'qr{(?i:foo)}smx' )
9 ->print();
10
11=head1 INHERITANCE
12
13C<PPIx::Regexp::Structure::Modifier> is a
14L<PPIx::Regexp::Structure|PPIx::Regexp::Structure>.
15
16C<PPIx::Regexp::Structure::Modifier> has no descendants.
17
18=head1 DESCRIPTION
19
20This class represents parentheses that apply modifiers to their contents
21-- even if there are no modifiers. The latter is to say that C<(?:foo)>
22also ends up as this class.
23
24=head1 METHODS
25
26This class provides no public methods beyond those provided by its
27superclass.
28
29=cut
30
31package PPIx::Regexp::Structure::Modifier;
32
33219µs234µs
# spent 22µs (11+11) within PPIx::Regexp::Structure::Modifier::BEGIN@33 which was called: # once (11µs+11µs) by PPIx::Regexp::Lexer::BEGIN@52 at line 33
use strict;
# spent 22µs making 1 call to PPIx::Regexp::Structure::Modifier::BEGIN@33 # spent 11µs making 1 call to strict::import
34220µs216µs
# spent 12µs (7+4) within PPIx::Regexp::Structure::Modifier::BEGIN@34 which was called: # once (7µs+4µs) by PPIx::Regexp::Lexer::BEGIN@52 at line 34
use warnings;
# spent 12µs making 1 call to PPIx::Regexp::Structure::Modifier::BEGIN@34 # spent 4µs making 1 call to warnings::import
35
36284µs2108µs
# spent 57µs (6+51) within PPIx::Regexp::Structure::Modifier::BEGIN@36 which was called: # once (6µs+51µs) by PPIx::Regexp::Lexer::BEGIN@52 at line 36
use base qw{ PPIx::Regexp::Structure };
# spent 57µs making 1 call to PPIx::Regexp::Structure::Modifier::BEGIN@36 # spent 51µs making 1 call to base::import
37
381600nsour $VERSION = '0.036';
39
40# This is a kluge for both determining whether the object asserts
41# modifiers (hence the 'ductype') and determining whether the given
42# modifier is actually asserted. The signature is the invocant and the
43# modifier name, which must not be undef. The return is a boolean.
44sub __ducktype_modifier_asserted {
45 my ( $self, $modifier ) = @_;
46 foreach my $type ( reverse $self->type() ) {
47 $type->can( '__ducktype_modifier_asserted' )
48 or next;
49 defined( my $val = $type->__ducktype_modifier_asserted( $modifier ) )
50 or next;
51 return $val;
52 }
53 return;
54}
55
5612µs1;
57
58__END__