File Coverage

blib/lib/PPIx/Regexp/Structure/Replacement.pm
Criterion Covered Total %
statement 13 14 92.8
branch n/a
condition n/a
subroutine 5 6 83.3
pod 2 2 100.0
total 20 22 90.9


line stmt bran cond sub pod time code
1             =head1 NAME
2              
3             PPIx::Regexp::Structure::Replacement - Represent the replacement in s///
4              
5             =head1 SYNOPSIS
6              
7             use PPIx::Regexp::Dumper;
8             PPIx::Regexp::Dumper->new( 's{foo}{bar}smxg' )
9             ->print();
10              
11             =head1 INHERITANCE
12              
13             C<PPIx::Regexp::Structure::Replacement> is a
14             L<PPIx::Regexp::Structure::Main|PPIx::Regexp::Structure::Main>.
15              
16             C<PPIx::Regexp::Structure::Replacement> has no descendants.
17              
18             =head1 DESCRIPTION
19              
20             This class represents the replacement in a substitution operation. In
21             the example given in the L</SYNOPSIS>, the C<{bar}> will be represented
22             by this class.
23              
24             Note that if the substitution is not bracketed (e.g. C<s/foo/bar/g>),
25             this structure will contain no starting delimiter.
26              
27             =head1 METHODS
28              
29             This class provides no public methods beyond those provided by its
30             superclass.
31              
32             =cut
33              
34             package PPIx::Regexp::Structure::Replacement;
35              
36 9     9   44 use strict;
  9         14  
  9         280  
37 9     9   28 use warnings;
  9         12  
  9         337  
38              
39 9     9   34 use base qw{ PPIx::Regexp::Structure::Main };
  9         10  
  9         671  
40              
41 9     9   38 use PPIx::Regexp::Constant qw{ @CARP_NOT };
  9         21  
  9         1071  
42              
43             our $VERSION = '0.091';
44              
45 0     0 1 0 sub can_be_quantified { return; }
46              
47             sub explain {
48 1     1 1 3 return 'Replacement string or expression';
49             }
50              
51             1;
52              
53             __END__
54              
55             =head1 SUPPORT
56              
57             Support is by the author. Please file bug reports at
58             L<https://rt.cpan.org/Public/Dist/Display.html?Name=PPIx-Regexp>,
59             L<https://github.com/trwyant/perl-PPIx-Regexp/issues>, or in
60             electronic mail to the author.
61              
62             =head1 AUTHOR
63              
64             Thomas R. Wyant, III F<wyant at cpan dot org>
65              
66             =head1 COPYRIGHT AND LICENSE
67              
68             Copyright (C) 2009-2023, 2025 by Thomas R. Wyant, III
69              
70             This program is free software; you can redistribute it and/or modify it
71             under the same terms as Perl 5.10.0. For more details, see the full text
72             of the licenses in the directory LICENSES.
73              
74             This program is distributed in the hope that it will be useful, but
75             without any warranty; without even the implied warranty of
76             merchantability or fitness for a particular purpose.
77              
78             =cut
79              
80             # ex: set textwidth=72 :