File Coverage

blib/lib/PPIx/Regexp/Token/GroupType/BranchReset.pm
Criterion Covered Total %
statement 15 15 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod n/a
total 20 20 100.0


line stmt bran cond sub pod time code
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     9   42 use strict;
  9         14  
  9         268  
33 9     9   31 use warnings;
  9         39  
  9         329  
34              
35 9     9   30 use base qw{ PPIx::Regexp::Token::GroupType };
  9         14  
  9         692  
36              
37 9     9   51 use PPIx::Regexp::Constant qw{ @CARP_NOT };
  9         13  
  9         948  
38              
39             our $VERSION = '0.091';
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         691 use constant DEF => {
69             '?|' => {
70             expl => 'Re-use capture group numbers',
71             intro => '5.009005',
72             },
73 9     9   43 };
  9         13  
74              
75             __PACKAGE__->__setup_class();
76              
77             1;
78              
79             __END__
80              
81             =head1 SUPPORT
82              
83             Support is by the author. Please file bug reports at
84             L<https://rt.cpan.org/Public/Dist/Display.html?Name=PPIx-Regexp>,
85             L<https://github.com/trwyant/perl-PPIx-Regexp/issues>, or in
86             electronic mail to the author.
87              
88             =head1 AUTHOR
89              
90             Thomas R. Wyant, III F<wyant at cpan dot org>
91              
92             =head1 COPYRIGHT AND LICENSE
93              
94             Copyright (C) 2009-2023, 2025 by Thomas R. Wyant, III
95              
96             This program is free software; you can redistribute it and/or modify it
97             under the same terms as Perl 5.10.0. For more details, see the full text
98             of the licenses in the directory LICENSES.
99              
100             This program is distributed in the hope that it will be useful, but
101             without any warranty; without even the implied warranty of
102             merchantability or fitness for a particular purpose.
103              
104             =cut
105              
106             # ex: set textwidth=72 :