← 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/GroupType/Modifier.pm
StatementsExecuted 12 statements in 397µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11120µs36µsPPIx::Regexp::Token::GroupType::Modifier::::BEGIN@34PPIx::Regexp::Token::GroupType::Modifier::BEGIN@34
11110µs37µsPPIx::Regexp::Token::GroupType::Modifier::::BEGIN@39PPIx::Regexp::Token::GroupType::Modifier::BEGIN@39
11110µs16µsPPIx::Regexp::Token::GroupType::Modifier::::BEGIN@35PPIx::Regexp::Token::GroupType::Modifier::BEGIN@35
1119µs131µsPPIx::Regexp::Token::GroupType::Modifier::::BEGIN@37PPIx::Regexp::Token::GroupType::Modifier::BEGIN@37
0000s0sPPIx::Regexp::Token::GroupType::Modifier::::__make_group_type_matcherPPIx::Regexp::Token::GroupType::Modifier::__make_group_type_matcher
0000s0sPPIx::Regexp::Token::GroupType::Modifier::::perl_version_introducedPPIx::Regexp::Token::GroupType::Modifier::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::GroupType::Modifier - Represent the modifiers in a modifier group.
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::Token::GroupType::Modifier> is a
14L<PPIx::Regexp::Token::GroupType|PPIx::Regexp::Token::GroupType> and a
15L<PPIx::Regexp::Token::Modifier|PPIx::Regexp::Token::Modifier>.
16
17C<PPIx::Regexp::Token::GroupType::Modifier> has no descendants.
18
19=head1 DESCRIPTION
20
21This class represents the modifiers in a modifier group. The useful
22functionality comes from
23L<PPIx::Regexp::Token::Modifier|PPIx::Regexp::Token::Modifier>.
24
25=head1 METHODS
26
27This class provides no public methods beyond those provided by its
28superclasses.
29
30=cut
31
32package PPIx::Regexp::Token::GroupType::Modifier;
33
34227µs253µs
# spent 36µs (20+16) within PPIx::Regexp::Token::GroupType::Modifier::BEGIN@34 which was called: # once (20µs+16µs) by PPIx::Regexp::Tokenizer::BEGIN@29 at line 34
use strict;
# spent 36µs making 1 call to PPIx::Regexp::Token::GroupType::Modifier::BEGIN@34 # spent 16µs making 1 call to strict::import
35233µs222µs
# spent 16µs (10+6) within PPIx::Regexp::Token::GroupType::Modifier::BEGIN@35 which was called: # once (10µs+6µs) by PPIx::Regexp::Tokenizer::BEGIN@29 at line 35
use warnings;
# spent 16µs making 1 call to PPIx::Regexp::Token::GroupType::Modifier::BEGIN@35 # spent 6µs making 1 call to warnings::import
36
37235µs2252µs
# spent 131µs (9+122) within PPIx::Regexp::Token::GroupType::Modifier::BEGIN@37 which was called: # once (9µs+122µs) by PPIx::Regexp::Tokenizer::BEGIN@29 at line 37
use base qw{ PPIx::Regexp::Token::Modifier PPIx::Regexp::Token::GroupType };
# spent 131µs making 1 call to PPIx::Regexp::Token::GroupType::Modifier::BEGIN@37 # spent 122µs making 1 call to base::import
38
392293µs264µs
# spent 37µs (10+27) within PPIx::Regexp::Token::GroupType::Modifier::BEGIN@39 which was called: # once (10µs+27µs) by PPIx::Regexp::Tokenizer::BEGIN@29 at line 39
use PPIx::Regexp::Constant qw{ MINIMUM_PERL };
# spent 37µs making 1 call to PPIx::Regexp::Token::GroupType::Modifier::BEGIN@39 # spent 27µs making 1 call to Exporter::import
40
411800nsour $VERSION = '0.036';
42
43{
44
4523µs my %perl_version_introduced = (
46 '?:' => MINIMUM_PERL,
47 );
48
49 sub perl_version_introduced {
50 my ( $self ) = @_;
51 my $content = $self->unescaped_content();
52 exists $perl_version_introduced{$content}
53 and return $perl_version_introduced{$content};
54 my $ver = $self->SUPER::perl_version_introduced();
55 $ver > 5.005 and return $ver;
56 return '5.005';
57 }
58
59}
60
61=begin comment
62
63# Return true if the token can be quantified, and false otherwise
64# sub can_be_quantified { return };
65
66sub __PPIX_TOKENIZER__regexp {
67 my ( $class, $tokenizer, $character, $char_type ) = @_;
68
69 # Note that the optional escapes are because any of the
70 # non-open-bracket punctuation characters might be our delimiter.
71 my $accept;
72 $accept = $tokenizer->find_regexp(
73 qr{ \A \\? [?] [[:lower:]]* \\? -? [[:lower:]]* \\? : }smx )
74 and return $accept;
75 $accept = $tokenizer->find_regexp(
76 qr{ \A \\? [?] \^ [[:lower:]]* \\? : }smx )
77 and return $accept;
78
79 return;
80}
81
82=end comment
83
84=cut
85
86sub __make_group_type_matcher {
87 return {
88 '' => [
89 qr{ \A [?] [[:lower:]]* -? [[:lower:]]* : }smx,
90 qr{ \A [?] \^ [[:lower:]]* : }smx,
91 ],
92 '?' => [
93 qr{ \A \\ [?] [[:lower:]]* -? [[:lower:]]* : }smx,
94 qr{ \A \\ [?] \^ [[:lower:]]* : }smx,
95 ],
96 '-' => [
97 qr{ \A [?] [[:lower:]]* (?: \\ - )? [[:lower:]]* : }smx,
98 qr{ \A [?] \^ [[:lower:]]* : }smx,
99 ],
100 ':' => [
101 qr{ \A [?] [[:lower:]]* -? [[:lower:]]* \\ : }smx,
102 qr{ \A [?] \^ [[:lower:]]* \\ : }smx,
103 ],
104 };
105}
106
10714µs1;
108
109__END__