File Coverage

blib/lib/PPIx/Regexp/Structure/RegexSet.pm
Criterion Covered Total %
statement 16 16 100.0
branch n/a
condition n/a
subroutine 6 6 100.0
pod n/a
total 22 22 100.0


line stmt bran cond sub pod time code
1             package PPIx::Regexp::Structure::RegexSet;
2              
3 9     9   43 use strict;
  9         14  
  9         261  
4 9     9   30 use warnings;
  9         14  
  9         326  
5              
6 9     9   31 use base qw{ PPIx::Regexp::Structure };
  9         12  
  9         642  
7              
8 9         909 use PPIx::Regexp::Constant qw{
9             LITERAL_LEFT_CURLY_REMOVED_PHASE_2
10             @CARP_NOT
11 9     9   36 };
  9         10  
12              
13 9     9   44 use PPIx::Regexp::Util qw{ :width_one };
  9         16  
  9         1061  
14              
15             our $VERSION = '0.091';
16              
17             sub __following_literal_left_curly_disallowed_in {
18 1     1   4 return LITERAL_LEFT_CURLY_REMOVED_PHASE_2;
19             }
20              
21             1;
22              
23             __END__
24              
25             =head1 NAME
26              
27             PPIx::Regexp::Structure::RegexSet - Represent a regexp character set
28              
29             =head1 SYNOPSIS
30              
31             use PPIx::Regexp::Dumper;
32             PPIx::Regexp::Dumper->new( 'qr{(?[ \w - [fox] ])}smx' )
33             ->print();
34              
35             =head1 INHERITANCE
36              
37             C<PPIx::Regexp::Structure::RegexSet> is a
38             L<PPIx::Regexp::Structure|PPIx::Regexp::Structure>.
39              
40             C<PPIx::Regexp::Structure::RegexSet> has no descendants.
41              
42             =head1 RESTRICTION
43              
44             When running under Perl 5.6, the extended white space characters are not
45             recognized as white space.
46              
47             =begin comment
48              
49             See the code in PPIx::Regexp::Token::Literal that generates
50             $regex_set_space for the actual machinery. The reason for the
51             restriction is that I was, for some reason, not able to get '\x{...}' to
52             work.
53              
54             =end comment
55              
56             =head1 DESCRIPTION
57              
58             This class represents a regex character set.
59              
60             These were introduced in Perl 5.17.8, and documented as experimental and
61             subject to change. If changes introduced in Perl result in changes in
62             the way C<PPIx::Regexp> parses the regular expression, C<PPIx::Regexp>
63             will track the change, even if they are incompatible with the previous
64             parse. If this functionality is retracted and the syntax used for
65             something else, C<PPIx::Regexp> will forget completely about regex
66             character sets.
67              
68             At some point, the documentation started calling these "Extended
69             Bracketed Character Classes", and documenting them in
70             L<perlrecharclass|perlrecharclass>.
71              
72             =head1 METHODS
73              
74             This class supports no public methods over and above those supported by
75             the superclasses.
76              
77             =head1 SUPPORT
78              
79             Support is by the author. Please file bug reports at
80             L<https://rt.cpan.org/Public/Dist/Display.html?Name=PPIx-Regexp>,
81             L<https://github.com/trwyant/perl-PPIx-Regexp/issues>, or in
82             electronic mail to the author.
83              
84             =head1 AUTHOR
85              
86             Thomas R. Wyant, III F<wyant at cpan dot org>
87              
88             =head1 COPYRIGHT AND LICENSE
89              
90             Copyright (C) 2013-2023, 2025 by Thomas R. Wyant, III
91              
92             This program is free software; you can redistribute it and/or modify it
93             under the same terms as Perl 5.10.0. For more details, see the full text
94             of the licenses in the directory LICENSES.
95              
96             This program is distributed in the hope that it will be useful, but
97             without any warranty; without even the implied warranty of
98             merchantability or fitness for a particular purpose.
99              
100             =cut
101              
102             # ex: set textwidth=72 :