| Filename | /Users/timbo/perl5/perlbrew/perls/perl-5.18.2/lib/site_perl/5.18.2/PPIx/Regexp/Token/GroupType/Assertion.pm |
| Statements | Executed 12 statements in 209µs |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 1 | 1 | 1 | 17µs | 34µs | PPIx::Regexp::Token::GroupType::Assertion::BEGIN@32 |
| 1 | 1 | 1 | 10µs | 16µs | PPIx::Regexp::Token::GroupType::Assertion::BEGIN@33 |
| 1 | 1 | 1 | 10µs | 37µs | PPIx::Regexp::Token::GroupType::Assertion::BEGIN@37 |
| 1 | 1 | 1 | 9µs | 786µs | PPIx::Regexp::Token::GroupType::Assertion::BEGIN@35 |
| 0 | 0 | 0 | 0s | 0s | PPIx::Regexp::Token::GroupType::Assertion::__defining_string |
| 0 | 0 | 0 | 0s | 0s | PPIx::Regexp::Token::GroupType::Assertion::perl_version_introduced |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | =head1 NAME | ||||
| 2 | |||||
| 3 | PPIx::Regexp::Token::GroupType::Assertion - Represent a look ahead or look behind assertion | ||||
| 4 | |||||
| 5 | =head1 SYNOPSIS | ||||
| 6 | |||||
| 7 | use PPIx::Regexp::Dumper; | ||||
| 8 | PPIx::Regexp::Dumper->new( 'qr{foo(?=bar)}smx' ) | ||||
| 9 | ->print(); | ||||
| 10 | |||||
| 11 | =head1 INHERITANCE | ||||
| 12 | |||||
| 13 | C<PPIx::Regexp::Token::GroupType::Assertion> is a | ||||
| 14 | L<PPIx::Regexp::Token::GroupType|PPIx::Regexp::Token::GroupType>. | ||||
| 15 | |||||
| 16 | C<PPIx::Regexp::Token::GroupType::Assertion> has no descendants. | ||||
| 17 | |||||
| 18 | =head1 DESCRIPTION | ||||
| 19 | |||||
| 20 | This class represents the parenthesized look ahead and look behind | ||||
| 21 | assertions. | ||||
| 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::Token::GroupType::Assertion; | ||||
| 31 | |||||
| 32 | 2 | 27µs | 2 | 50µs | # spent 34µs (17+17) within PPIx::Regexp::Token::GroupType::Assertion::BEGIN@32 which was called:
# once (17µs+17µs) by PPIx::Regexp::Tokenizer::BEGIN@26 at line 32 # spent 34µs making 1 call to PPIx::Regexp::Token::GroupType::Assertion::BEGIN@32
# spent 17µs making 1 call to strict::import |
| 33 | 2 | 28µs | 2 | 23µs | # spent 16µs (10+6) within PPIx::Regexp::Token::GroupType::Assertion::BEGIN@33 which was called:
# once (10µs+6µs) by PPIx::Regexp::Tokenizer::BEGIN@26 at line 33 # spent 16µs making 1 call to PPIx::Regexp::Token::GroupType::Assertion::BEGIN@33
# spent 6µs making 1 call to warnings::import |
| 34 | |||||
| 35 | 2 | 32µs | 2 | 1.56ms | # spent 786µs (9+777) within PPIx::Regexp::Token::GroupType::Assertion::BEGIN@35 which was called:
# once (9µs+777µs) by PPIx::Regexp::Tokenizer::BEGIN@26 at line 35 # spent 786µs making 1 call to PPIx::Regexp::Token::GroupType::Assertion::BEGIN@35
# spent 777µs making 1 call to base::import |
| 36 | |||||
| 37 | 2 | 113µs | 2 | 65µs | # spent 37µs (10+28) within PPIx::Regexp::Token::GroupType::Assertion::BEGIN@37 which was called:
# once (10µs+28µs) by PPIx::Regexp::Tokenizer::BEGIN@26 at line 37 # spent 37µs making 1 call to PPIx::Regexp::Token::GroupType::Assertion::BEGIN@37
# spent 28µs making 1 call to Exporter::import |
| 38 | |||||
| 39 | 1 | 800ns | our $VERSION = '0.036'; | ||
| 40 | |||||
| 41 | { | ||||
| 42 | 2 | 3µs | my %perl_version_introduced = ( | ||
| 43 | '?<=' => '5.005', | ||||
| 44 | '?<!' => '5.005', | ||||
| 45 | ); | ||||
| 46 | |||||
| 47 | sub perl_version_introduced { | ||||
| 48 | my ( $self ) = @_; | ||||
| 49 | return $perl_version_introduced{ $self->unescaped_content() } || | ||||
| 50 | MINIMUM_PERL; | ||||
| 51 | } | ||||
| 52 | } | ||||
| 53 | |||||
| 54 | # Return true if the token can be quantified, and false otherwise | ||||
| 55 | # sub can_be_quantified { return }; | ||||
| 56 | |||||
| 57 | sub __defining_string { | ||||
| 58 | return ( '?=', '?<=', '?!', '?<!' ); | ||||
| 59 | } | ||||
| 60 | |||||
| 61 | 1 | 4µs | 1; | ||
| 62 | |||||
| 63 | __END__ |