line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
3
|
|
|
3
|
|
208024
|
use 5.006; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
95
|
|
2
|
3
|
|
|
3
|
|
11
|
use strict; |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
84
|
|
3
|
3
|
|
|
3
|
|
18
|
use warnings; |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
177
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Pod::Eventual::Reconstruct::LazyCut; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
# ABSTRACT: A Subclass of Pod::Eventual::Reconstruct that emits less =cut's |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $VERSION = '1.000001'; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:KENTNL'; # AUTHORITY |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
|
24
|
3
|
|
|
3
|
|
1936
|
use Moo qw( extends has around ); |
|
3
|
|
|
|
|
10921
|
|
|
3
|
|
|
|
|
17
|
|
25
|
3
|
|
|
3
|
|
1726
|
use Carp qw(carp); |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
150
|
|
26
|
3
|
|
|
3
|
|
1526
|
use Data::Dump qw(pp); |
|
3
|
|
|
|
|
13500
|
|
|
3
|
|
|
|
|
870
|
|
27
|
|
|
|
|
|
|
extends 'Pod::Eventual::Reconstruct'; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
has 'inpod' => ( |
40
|
|
|
|
|
|
|
is => ro =>, |
41
|
|
|
|
|
|
|
writer => 'set_inpod', |
42
|
|
|
|
|
|
|
clearer => 'clear_inpod', |
43
|
|
|
|
|
|
|
predicate => 'is_inpod', |
44
|
|
|
|
|
|
|
lazy => 1, |
45
|
0
|
|
|
0
|
|
|
builder => sub { undef }, |
46
|
|
|
|
|
|
|
); |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
around write_command => sub { |
49
|
|
|
|
|
|
|
my ( $orig, $self, $event ) = @_; |
50
|
|
|
|
|
|
|
if ( $event->{type} ne 'command' ) { |
51
|
|
|
|
|
|
|
return $self->$orig($event); |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
if ( $event->{command} ne 'cut' ) { |
54
|
|
|
|
|
|
|
my $result = $self->$orig($event); |
55
|
|
|
|
|
|
|
$self->set_inpod(1); |
56
|
|
|
|
|
|
|
return $result; |
57
|
|
|
|
|
|
|
} |
58
|
|
|
|
|
|
|
if ( $self->is_inpod ) { |
59
|
|
|
|
|
|
|
my $result = $self->$orig($event); |
60
|
|
|
|
|
|
|
$self->clear_inpod(); |
61
|
|
|
|
|
|
|
return $result; |
62
|
|
|
|
|
|
|
} |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
# Skipping a cut |
65
|
|
|
|
|
|
|
return $self; |
66
|
|
|
|
|
|
|
}; |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
around write_text => sub { |
69
|
|
|
|
|
|
|
my ( $orig, $self, $event ) = @_; |
70
|
|
|
|
|
|
|
if ( $event->{type} ne 'text' ) { |
71
|
|
|
|
|
|
|
return $self->$orig($event); |
72
|
|
|
|
|
|
|
} |
73
|
|
|
|
|
|
|
if ( not $self->is_inpod ) { |
74
|
|
|
|
|
|
|
return $self->write_text_outside_pod( $orig, $event ); |
75
|
|
|
|
|
|
|
} |
76
|
|
|
|
|
|
|
return $self->$orig($event); |
77
|
|
|
|
|
|
|
}; |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
around write_nonpod => sub { |
80
|
|
|
|
|
|
|
my ( $orig, $self, $event ) = @_; |
81
|
|
|
|
|
|
|
if ( $event->{type} ne 'nonpod' ) { |
82
|
|
|
|
|
|
|
return $self->$orig($event); |
83
|
|
|
|
|
|
|
} |
84
|
|
|
|
|
|
|
if ( $self->is_inpod ) { |
85
|
|
|
|
|
|
|
return $self->write_nonpod_inside_pod( $orig, $event ); |
86
|
|
|
|
|
|
|
} |
87
|
|
|
|
|
|
|
return $self->$orig($event); |
88
|
|
|
|
|
|
|
}; |
89
|
|
|
|
|
|
|
|
90
|
3
|
|
|
3
|
|
21
|
no Moo; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
17
|
|
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
sub write_text_outside_pod { |
105
|
0
|
|
|
0
|
1
|
|
my ( $self, $orig, $event ) = @_; |
106
|
0
|
|
|
|
|
|
carp 'POD Text element outside POD ' . pp($event); |
107
|
0
|
|
|
|
|
|
return $self->$orig($event); |
108
|
|
|
|
|
|
|
} |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
sub write_nonpod_inside_pod { |
123
|
0
|
|
|
0
|
1
|
|
my ( $self, $orig, $event ) = @_; |
124
|
0
|
|
|
|
|
|
carp 'NONPOD element inside POD ' . pp($event); |
125
|
0
|
|
|
|
|
|
return $self->$orig($event); |
126
|
|
|
|
|
|
|
} |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
1; |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
__END__ |