line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Module::Changes::ADAMK::Change; |
2
|
|
|
|
|
|
|
|
3
|
5
|
|
|
5
|
|
153
|
use 5.006; |
|
5
|
|
|
|
|
16
|
|
|
5
|
|
|
|
|
184
|
|
4
|
5
|
|
|
5
|
|
27
|
use strict; |
|
5
|
|
|
|
|
9
|
|
|
5
|
|
|
|
|
139
|
|
5
|
5
|
|
|
5
|
|
27
|
use warnings; |
|
5
|
|
|
|
|
8
|
|
|
5
|
|
|
|
|
129
|
|
6
|
5
|
|
|
5
|
|
25
|
use Carp (); |
|
5
|
|
|
|
|
8
|
|
|
5
|
|
|
|
|
114
|
|
7
|
|
|
|
|
|
|
|
8
|
5
|
|
|
5
|
|
25
|
use vars qw{$VERSION}; |
|
5
|
|
|
|
|
7
|
|
|
5
|
|
|
|
|
226
|
|
9
|
|
|
|
|
|
|
BEGIN { |
10
|
5
|
|
|
5
|
|
149
|
$VERSION = '0.11'; |
11
|
|
|
|
|
|
|
} |
12
|
|
|
|
|
|
|
|
13
|
5
|
|
|
|
|
37
|
use Object::Tiny qw{ |
14
|
|
|
|
|
|
|
string |
15
|
|
|
|
|
|
|
message |
16
|
|
|
|
|
|
|
author |
17
|
5
|
|
|
5
|
|
9349
|
}; |
|
5
|
|
|
|
|
2422
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
##################################################################### |
24
|
|
|
|
|
|
|
# Constructor |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub new { |
27
|
155
|
|
|
155
|
0
|
207
|
my $class = shift; |
28
|
155
|
|
|
|
|
725
|
my $self = bless { string => shift }, $class; |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
# Get the paragraph strings |
31
|
155
|
|
|
|
|
503
|
my @lines = split /\n/, $self->{string}; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
# A (FOO) at the end indicates an author |
34
|
155
|
100
|
|
|
|
544
|
if ( $lines[-1] =~ s/\s*\((\w+)\)\s*\z//s ) { |
35
|
17
|
|
|
|
|
568
|
$self->{author} = $1; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
# Trim the lines and merge to get the long-form message |
39
|
190
|
|
|
|
|
556
|
$self->{message} = join ' ', grep { |
40
|
155
|
|
|
|
|
304
|
s/^\s+//; |
41
|
190
|
|
|
|
|
670
|
s/\s+\z//; |
42
|
190
|
|
|
|
|
589
|
$_ |
43
|
|
|
|
|
|
|
} @lines; |
44
|
155
|
|
|
|
|
496
|
$self->{message} =~ s/^-\s*//; |
45
|
|
|
|
|
|
|
|
46
|
155
|
|
|
|
|
473
|
return $self; |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
##################################################################### |
54
|
|
|
|
|
|
|
# Stringification |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
sub as_string { |
57
|
55
|
|
|
55
|
0
|
1075
|
$_[0]->string; |
58
|
|
|
|
|
|
|
} |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
sub roundtrips { |
61
|
2
|
|
|
2
|
0
|
1733
|
$_[0]->string eq $_[0]->as_string |
62
|
|
|
|
|
|
|
} |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
1; |