| 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 | PPIx::Regexp::Structure::Quantifier::BEGIN@32 |
| 1 | 1 | 1 | 7µs | 62µs | PPIx::Regexp::Structure::Quantifier::BEGIN@35 |
| 1 | 1 | 1 | 7µs | 11µs | PPIx::Regexp::Structure::Quantifier::BEGIN@33 |
| 0 | 0 | 0 | 0s | 0s | PPIx::Regexp::Structure::Quantifier::__PPIX_LEXER__record_capture_number |
| 0 | 0 | 0 | 0s | 0s | PPIx::Regexp::Structure::Quantifier::can_be_quantified |
| 0 | 0 | 0 | 0s | 0s | PPIx::Regexp::Structure::Quantifier::is_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__ |