| 1 | =head1 NAME | ||
| 2 | |||
| 3 | PPIx::Regexp::Token::GroupType::BranchReset - Represent a branch reset specifier | ||
| 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::BranchReset> is a | ||
| 14 | L<PPIx::Regexp::Token::GroupType|PPIx::Regexp::Token::GroupType>. | ||
| 15 | |||
| 16 | C<PPIx::Regexp::Token::GroupType::BranchReset> has no descendants. | ||
| 17 | |||
| 18 | =head1 DESCRIPTION | ||
| 19 | |||
| 20 | This token represents the specifier for a branch reset - namely the | ||
| 21 | C<?|> that comes after the left parenthesis. | ||
| 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::BranchReset; | ||
| 31 | |||
| 32 | 9 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 33 | 9 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 34 | |||
| 35 | 9 | ▶ | use base qw{ PPIx::Regexp::Token::GroupType }; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 36 | |||
| 37 | 9 | ▶ | use PPIx::Regexp::Constant qw{ @CARP_NOT }; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 38 | |||
| 39 | 9 | our $VERSION = '0.092'; | |
| 40 | |||
| 41 | =begin comment | ||
| 42 | |||
| 43 | # Return true if the token can be quantified, and false otherwise | ||
| 44 | # sub can_be_quantified { return }; | ||
| 45 | |||
| 46 | { | ||
| 47 | my %explanation = ( | ||
| 48 | '?|' => 'Re-use capture group numbers', | ||
| 49 | ); | ||
| 50 | |||
| 51 | sub __explanation { | ||
| 52 | return \%explanation; | ||
| 53 | } | ||
| 54 | } | ||
| 55 | |||
| 56 | sub perl_version_introduced { | ||
| 57 | return '5.009005'; | ||
| 58 | } | ||
| 59 | |||
| 60 | sub __defining_string { | ||
| 61 | return '?|'; | ||
| 62 | } | ||
| 63 | |||
| 64 | =end comment | ||
| 65 | |||
| 66 | =cut | ||
| 67 | |||
| 68 | 9 | ▶ | use constant DEF => { |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 69 | '?|' => { | ||
| 70 | expl => 'Re-use capture group numbers', | ||
| 71 | intro => '5.009005', | ||
| 72 | }, | ||
| 73 | 9 | }; | |
| 74 | |||
| 75 | 9 | __PACKAGE__->__setup_class(); | |
| 76 | |||
| 77 | 9 | 1; | |
| 78 | |||
| 79 | __END__ | ||