File Coverage

blib/lib/PPIx/Regexp/Token/NoOp.pm
Criterion Covered Total %
statement 23 24 95.8
branch 3 4 75.0
condition n/a
subroutine 9 10 90.0
pod 3 3 100.0
total 38 41 92.6


line stmt bran cond sub pod time code
1             package PPIx::Regexp::Token::NoOp;
2              
3 9     9   163 use 5.006;
  9         25  
4              
5 9     9   39 use strict;
  9         16  
  9         203  
6 9     9   27 use warnings;
  9         11  
  9         401  
7              
8 9     9   34 use base qw{ PPIx::Regexp::Token };
  9         20  
  9         673  
9              
10 9     9   38 use Carp;
  9         18  
  9         499  
11 9     9   34 use PPIx::Regexp::Constant qw{ MINIMUM_PERL @CARP_NOT };
  9         16  
  9         2034  
12              
13             our $VERSION = '0.091';
14              
15             {
16             my %when_removed = (
17             '\\N{}' => '5.027001',
18             );
19              
20             sub __new {
21 153     153   377 my ( $class, $content, %arg ) = @_;
22              
23             defined $arg{perl_version_introduced}
24 153 100       325 or $arg{perl_version_introduced} = MINIMUM_PERL;
25              
26             exists $arg{perl_version_removed}
27 153 50       337 or $arg{perl_version_removed} = $when_removed{$content};
28              
29 153         478 return $class->SUPER::__new( $content, %arg );
30             }
31             }
32              
33             # Return true if the token can be quantified, and false otherwise
34 0     0 1 0 sub can_be_quantified { return };
35              
36             sub explain {
37 1     1 1 4 return 'Not significant';
38             }
39              
40             sub significant {
41 355     355 1 647 return;
42             }
43              
44             1;
45              
46             __END__
47              
48             =head1 NAME
49              
50             PPIx::Regexp::Token::NoOp - Represent a token that does nothing.
51              
52             =head1 SYNOPSIS
53              
54             use PPIx::Regexp::Dumper;
55             PPIx::Regexp::Dumper->new( 'qr< \N{} >smx' )
56             ->print();
57              
58             =head1 INHERITANCE
59              
60             C<PPIx::Regexp::Token::NoOp> is a
61             L<PPIx::Regexp::Token|PPIx::Regexp::Token>.
62              
63             C<PPIx::Regexp::Token::NoOp> is the parent of
64             L<PPIx::Regexp::Token::Whitespace|PPIx::Regexp::Token::Whitespace>.
65              
66             =head1 DESCRIPTION
67              
68             This class represents a token the does nothing.
69              
70             =head1 METHODS
71              
72             This class provides no public methods beyond those provided by its
73             superclass.
74              
75             =head1 SUPPORT
76              
77             Support is by the author. Please file bug reports at
78             L<https://rt.cpan.org/Public/Dist/Display.html?Name=PPIx-Regexp>,
79             L<https://github.com/trwyant/perl-PPIx-Regexp/issues>, or in
80             electronic mail to the author.
81              
82             =head1 AUTHOR
83              
84             Thomas R. Wyant, III F<wyant at cpan dot org>
85              
86             =head1 COPYRIGHT AND LICENSE
87              
88             Copyright (C) 2016-2023, 2025 by Thomas R. Wyant, III
89              
90             This program is free software; you can redistribute it and/or modify it
91             under the same terms as Perl 5.10.0. For more details, see the full text
92             of the licenses in the directory LICENSES.
93              
94             This program is distributed in the hope that it will be useful, but
95             without any warranty; without even the implied warranty of
96             merchantability or fitness for a particular purpose.
97              
98             =cut
99              
100             # ex: set textwidth=72 :