Filename | /Users/timbo/perl5/perlbrew/perls/perl-5.18.2/lib/site_perl/5.18.2/PPIx/Regexp/Structure/Quantifier.pm |
Statements | Executed 8 statements in 113µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 12µs | 23µs | BEGIN@32 | PPIx::Regexp::Structure::Quantifier::
1 | 1 | 1 | 7µs | 62µs | BEGIN@35 | PPIx::Regexp::Structure::Quantifier::
1 | 1 | 1 | 7µs | 11µs | BEGIN@33 | PPIx::Regexp::Structure::Quantifier::
0 | 0 | 0 | 0s | 0s | __PPIX_LEXER__record_capture_number | PPIx::Regexp::Structure::Quantifier::
0 | 0 | 0 | 0s | 0s | can_be_quantified | PPIx::Regexp::Structure::Quantifier::
0 | 0 | 0 | 0s | 0s | is_quantifier | PPIx::Regexp::Structure::Quantifier::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | =head1 NAME | ||||
2 | |||||
3 | PPIx::Regexp::Structure::Quantifier - Represent curly bracket quantifiers | ||||
4 | |||||
5 | =head1 SYNOPSIS | ||||
6 | |||||
7 | use PPIx::Regexp::Dumper; | ||||
8 | PPIx::Regexp::Dumper->new( 'qr{fo{2,}}smx' ) | ||||
9 | ->print(); | ||||
10 | |||||
11 | =head1 INHERITANCE | ||||
12 | |||||
13 | C<PPIx::Regexp::Structure::Quantifier> is a | ||||
14 | L<PPIx::Regexp::Structure|PPIx::Regexp::Structure>. | ||||
15 | |||||
16 | C<PPIx::Regexp::Structure::Quantifier> has no descendants. | ||||
17 | |||||
18 | =head1 DESCRIPTION | ||||
19 | |||||
20 | This class represents curly bracket quantifiers such as C<{3}>, C<{3,}> | ||||
21 | and C<{3,5}>. The contents are left as literals or interpolations. | ||||
22 | |||||
23 | =head1 METHODS | ||||
24 | |||||
25 | This class provides no public methods beyond those provided by its | ||||
26 | superclass. | ||||
27 | |||||
28 | =cut | ||||
29 | |||||
30 | package PPIx::Regexp::Structure::Quantifier; | ||||
31 | |||||
32 | 2 | 18µs | 2 | 35µs | # spent 23µs (12+12) within PPIx::Regexp::Structure::Quantifier::BEGIN@32 which was called:
# once (12µs+12µs) by PPIx::Regexp::Lexer::BEGIN@54 at line 32 # spent 23µs making 1 call to PPIx::Regexp::Structure::Quantifier::BEGIN@32
# spent 12µs making 1 call to strict::import |
33 | 2 | 20µs | 2 | 15µs | # spent 11µs (7+4) within PPIx::Regexp::Structure::Quantifier::BEGIN@33 which was called:
# once (7µs+4µs) by PPIx::Regexp::Lexer::BEGIN@54 at line 33 # spent 11µs making 1 call to PPIx::Regexp::Structure::Quantifier::BEGIN@33
# spent 4µs making 1 call to warnings::import |
34 | |||||
35 | 2 | 72µs | 2 | 118µs | # spent 62µs (7+55) within PPIx::Regexp::Structure::Quantifier::BEGIN@35 which was called:
# once (7µs+55µs) by PPIx::Regexp::Lexer::BEGIN@54 at line 35 # spent 62µs making 1 call to PPIx::Regexp::Structure::Quantifier::BEGIN@35
# spent 55µs making 1 call to base::import |
36 | |||||
37 | 1 | 600ns | our $VERSION = '0.036'; | ||
38 | |||||
39 | sub can_be_quantified { | ||||
40 | return; | ||||
41 | } | ||||
42 | |||||
43 | sub is_quantifier { | ||||
44 | return 1; | ||||
45 | } | ||||
46 | |||||
47 | # Called by the lexer to record the capture number. | ||||
48 | sub __PPIX_LEXER__record_capture_number { | ||||
49 | my ( $self, $number ) = @_; | ||||
50 | return $number; | ||||
51 | } | ||||
52 | |||||
53 | 1 | 2µs | 1; | ||
54 | |||||
55 | __END__ |