line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
3
|
|
|
3
|
|
191236
|
use 5.006; |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
95
|
|
2
|
3
|
|
|
3
|
|
28
|
use strict; |
|
3
|
|
|
|
|
3
|
|
|
3
|
|
|
|
|
84
|
|
3
|
3
|
|
|
3
|
|
20
|
use warnings; |
|
3
|
|
|
|
|
2
|
|
|
3
|
|
|
|
|
178
|
|
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.000000'; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:KENTNL'; # AUTHORITY |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
|
24
|
3
|
|
|
3
|
|
1693
|
use Moo qw( extends has around ); |
|
3
|
|
|
|
|
11427
|
|
|
3
|
|
|
|
|
13
|
|
25
|
3
|
|
|
3
|
|
1655
|
use Carp qw(carp); |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
147
|
|
26
|
3
|
|
|
3
|
|
1356
|
use Data::Dump qw(pp); |
|
3
|
|
|
|
|
19545
|
|
|
3
|
|
|
|
|
847
|
|
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
|
|
17
|
no Moo; |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
18
|
|
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__ |