line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Module::Changes::Parser; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
13
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
67
|
|
4
|
2
|
|
|
2
|
|
10
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
93
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.05'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
|
10
|
2
|
|
|
2
|
|
8
|
use base 'Module::Changes::Base'; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
568
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
__PACKAGE__->mk_abstract_accessors(qw(parse_string)); |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub parse_from_filehandle { |
17
|
0
|
|
|
0
|
1
|
|
my ($self, $filehandle) = @_; |
18
|
0
|
|
|
|
|
|
my $content = do { local $/; <$filehandle> }; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
19
|
0
|
|
|
|
|
|
$self->parse_string($content); |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub parse_from_file { |
24
|
0
|
|
|
0
|
1
|
|
my ($self, $filename) = @_; |
25
|
0
|
0
|
|
|
|
|
open my $fh, '<', $filename or die "can't open $filename: $!\n"; |
26
|
0
|
|
|
|
|
|
my $changes = $self->parse_from_filehandle($fh); |
27
|
0
|
0
|
|
|
|
|
close $fh or die "can't close $filename: $!\n"; |
28
|
0
|
|
|
|
|
|
$changes; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
1; |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
__END__ |