File Coverage

blib/lib/PPIx/Regexp/Token/CharClass.pm
Criterion Covered Total %
statement 16 16 100.0
branch n/a
condition n/a
subroutine 6 6 100.0
pod 1 1 100.0
total 23 23 100.0


line stmt bran cond sub pod time code
1             =head1 NAME
2              
3             PPIx::Regexp::Token::CharClass - Represent a character class
4              
5             =head1 SYNOPSIS
6              
7             use PPIx::Regexp::Dumper;
8             PPIx::Regexp::Dumper->new( 'qr{\w}smx' )
9             ->print();
10              
11             =head1 INHERITANCE
12              
13             C<PPIx::Regexp::Token::CharClass> is a
14             L<PPIx::Regexp::Token|PPIx::Regexp::Token>.
15              
16             C<PPIx::Regexp::Token::CharClass> is the parent of
17             L<PPIx::Regexp::Token::CharClass::POSIX|PPIx::Regexp::Token::CharClass::POSIX>
18             and
19             L<PPIx::Regexp::Token::CharClass::Simple|PPIx::Regexp::Token::CharClass::Simple>.
20              
21             =head1 DESCRIPTION
22              
23             This class represents a character class. It is not intended that this
24             class be instantiated; it simply serves to identify a character class in
25             the class hierarchy, and provide any common methods that might become
26             useful.
27              
28             =head1 METHODS
29              
30             This class provides the following public methods beyond those provided
31             by its superclass.
32              
33             =cut
34              
35             package PPIx::Regexp::Token::CharClass;
36              
37 9     9   60 use strict;
  9         13  
  9         236  
38 9     9   29 use warnings;
  9         14  
  9         378  
39              
40 9     9   42 use base qw{ PPIx::Regexp::Token };
  9         20  
  9         707  
41              
42 9     9   48 use PPIx::Regexp::Constant qw{ @CARP_NOT };
  9         28  
  9         819  
43              
44 9     9   46 use PPIx::Regexp::Util qw{ :width_one };
  9         31  
  9         1129  
45              
46             our $VERSION = '0.091';
47              
48             # Return true if the token can be quantified, and false otherwise
49             # sub can_be_quantified { return };
50              
51             ##=head2 is_case_sensitive
52             ##
53             ##This method returns true if the character class is case-sensitive (that
54             ##is, if it may match or not based on the case of the string being
55             ##matched), false (but defined) if it is not, and simply returns (giving
56             ##C<undef> in scalar context and an empty list in list context) if the
57             ##case-sensitivity can not be determined.
58             ##
59             ##=cut
60             ##
61             ##sub is_case_sensitive {
62             ## return;
63             ##}
64              
65             =head2 is_matcher
66              
67             This method returns a true value because a character class actually
68             matches something.
69              
70             =cut
71              
72 1     1 1 2 sub is_matcher { return 1; }
73              
74             1;
75              
76             __END__
77              
78             =head1 SUPPORT
79              
80             Support is by the author. Please file bug reports at
81             L<https://rt.cpan.org/Public/Dist/Display.html?Name=PPIx-Regexp>,
82             L<https://github.com/trwyant/perl-PPIx-Regexp/issues>, or in
83             electronic mail to the author.
84              
85             =head1 AUTHOR
86              
87             Thomas R. Wyant, III F<wyant at cpan dot org>
88              
89             =head1 COPYRIGHT AND LICENSE
90              
91             Copyright (C) 2009-2023, 2025 by Thomas R. Wyant, III
92              
93             This program is free software; you can redistribute it and/or modify it
94             under the same terms as Perl 5.10.0. For more details, see the full text
95             of the licenses in the directory LICENSES.
96              
97             This program is distributed in the hope that it will be useful, but
98             without any warranty; without even the implied warranty of
99             merchantability or fitness for a particular purpose.
100              
101             =cut
102              
103             # ex: set textwidth=72 :