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 is a |
14
|
|
|
|
|
|
|
L. |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
C 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, the C<{bar}> will be represented |
22
|
|
|
|
|
|
|
by this class. |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
Note that if the substitution is not bracketed (e.g. C), |
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
|
|
59
|
use strict; |
|
9
|
|
|
|
|
22
|
|
|
9
|
|
|
|
|
240
|
|
37
|
9
|
|
|
9
|
|
43
|
use warnings; |
|
9
|
|
|
|
|
19
|
|
|
9
|
|
|
|
|
222
|
|
38
|
|
|
|
|
|
|
|
39
|
9
|
|
|
9
|
|
48
|
use base qw{ PPIx::Regexp::Structure::Main }; |
|
9
|
|
|
|
|
19
|
|
|
9
|
|
|
|
|
731
|
|
40
|
|
|
|
|
|
|
|
41
|
9
|
|
|
9
|
|
74
|
use PPIx::Regexp::Constant qw{ @CARP_NOT }; |
|
9
|
|
|
|
|
25
|
|
|
9
|
|
|
|
|
1382
|
|
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
our $VERSION = '0.088'; |
44
|
|
|
|
|
|
|
|
45
|
0
|
|
|
0
|
1
|
0
|
sub can_be_quantified { return; } |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
sub explain { |
48
|
1
|
|
|
1
|
1
|
4
|
return 'Replacement string or expression'; |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
1; |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
__END__ |