line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Module::Changes::Formatter::Free; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
1266
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
56
|
|
4
|
2
|
|
|
2
|
|
9
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
64
|
|
5
|
2
|
|
|
2
|
|
2226
|
use DateTime::Format::Mail; |
|
2
|
|
|
|
|
4798
|
|
|
2
|
|
|
|
|
24
|
|
6
|
2
|
|
|
2
|
|
60
|
use YAML; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
150
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $VERSION = '0.05'; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
|
12
|
2
|
|
|
2
|
|
12
|
use base 'Module::Changes::Formatter'; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
172
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
__PACKAGE__->mk_scalar_accessors(qw(indent)); |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
|
18
|
2
|
|
|
|
|
733
|
use constant DEFAULTS => ( |
19
|
|
|
|
|
|
|
indent => 4, |
20
|
2
|
|
|
2
|
|
9
|
); |
|
2
|
|
|
|
|
4
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub format_line { |
24
|
1
|
|
|
1
|
1
|
3
|
my ($self, $text) = @_; |
25
|
|
|
|
|
|
|
# FIXME handle long text by correctly wrapping it |
26
|
1
|
|
|
|
|
5
|
sprintf "%s - %s\n", ' ' x $self->indent, $text; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub format_release { |
31
|
1
|
|
|
1
|
1
|
3
|
my ($self, $release) = @_; |
32
|
1
|
|
|
|
|
7
|
my $text = sprintf "%s %s (%s)\n", |
33
|
|
|
|
|
|
|
$release->version_as_string, |
34
|
|
|
|
|
|
|
DateTime::Format::Mail->new->format_datetime($release->date), |
35
|
|
|
|
|
|
|
$release->author; |
36
|
1
|
|
|
|
|
664
|
$text .= $self->format_line($_) for grep { defined } $release->changes; |
|
1
|
|
|
|
|
16
|
|
37
|
1
|
50
|
|
|
|
16
|
if (grep { defined } $release->tags) { |
|
0
|
|
|
|
|
0
|
|
38
|
0
|
|
|
|
|
0
|
$text .= $self->format_line( |
39
|
|
|
|
|
|
|
sprintf 'tags: %s', |
40
|
|
|
|
|
|
|
join ', ' => |
41
|
0
|
|
|
|
|
0
|
grep { defined } |
42
|
|
|
|
|
|
|
$release->tags |
43
|
|
|
|
|
|
|
); |
44
|
|
|
|
|
|
|
} |
45
|
1
|
|
|
|
|
15
|
$text; |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
sub format { |
50
|
1
|
|
|
1
|
1
|
8
|
my ($self, $changes) = @_; |
51
|
|
|
|
|
|
|
|
52
|
1
|
|
|
|
|
6
|
my $text = sprintf "Revision history for Perl extension %s\n\n", |
53
|
|
|
|
|
|
|
$changes->name; |
54
|
|
|
|
|
|
|
|
55
|
1
|
|
|
|
|
17
|
$text .= |
56
|
|
|
|
|
|
|
join "\n" => |
57
|
1
|
|
|
|
|
16
|
map { $self->format_release($_) } |
58
|
|
|
|
|
|
|
$changes->releases; |
59
|
|
|
|
|
|
|
|
60
|
1
|
|
|
|
|
6
|
$text; |
61
|
|
|
|
|
|
|
} |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
1; |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
__END__ |