Regexp/Structure/Replacement.pm

filter: Statementstmt 93.7% 15 / 16 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 83.3% 5 / 6 Podpod 100% 2 / 2 totaltotal 91.6% 22 / 24 CC 1 SCAR 1.5
CC
1
Cov
94%
can_be_quantified
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« Regexp/Structure/NamedCapture.pm ↑ Summary Regexp/Token/Comment.pm »
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 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
37 9 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
38  
39 9 ▶use base qw{ PPIx::Regexp::Structure::Main };
Subroutine BEGIN: called CC=1 SCAR=0.0
40  
41 9 ▶use PPIx::Regexp::Constant qw{ @CARP_NOT };
Subroutine BEGIN: called CC=1 SCAR=0.0
42  
43 9 our $VERSION = '0.092';
44  
45 0 ▶sub can_be_quantified { return; }
Subroutine can_be_quantified: not called CC=1 SCAR=6.9
Pod documented
46  
47 1 ▶sub explain {
Subroutine explain: called CC=1 SCAR=0.0
Pod documented
48 1 return 'Replacement string or expression';
49 }
50  
51 9 1;
52  
53 __END__
« Regexp/Structure/NamedCapture.pm ↑ Summary Regexp/Token/Comment.pm »