line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#!/usr/bin/perl |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
512
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
31
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
49
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
package PodParser; |
7
|
1
|
|
|
1
|
|
6
|
use base qw( Parser::MGC ); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
525
|
|
8
|
|
|
|
|
|
|
|
9
|
1
|
|
|
1
|
|
6
|
use Feature::Compat::Try; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
9
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub parse |
12
|
|
|
|
|
|
|
{ |
13
|
10
|
|
|
10
|
|
10
|
my $self = shift; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
$self->sequence_of( |
16
|
|
|
|
|
|
|
sub { $self->any_of( |
17
|
|
|
|
|
|
|
|
18
|
15
|
|
|
|
|
59
|
sub { my ( undef, $tag, $delim ) = $self->expect( qr/([A-Z])(<+)/ ); |
19
|
5
|
|
|
|
|
20
|
$self->commit; |
20
|
5
|
|
|
|
|
37
|
+{ $tag => $self->scope_of( undef, \&parse, ">" x length $delim ) }; }, |
21
|
|
|
|
|
|
|
|
22
|
10
|
|
|
|
|
42
|
sub { $self->substring_before( qr/[A-Z] ) }, |
23
|
15
|
|
|
15
|
|
84
|
) }, |
24
|
10
|
|
|
|
|
56
|
); |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
1
|
|
|
1
|
|
971
|
use Data::Dumper; |
|
1
|
|
|
|
|
6704
|
|
|
1
|
|
|
|
|
214
|
|
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
if( !caller ) { |
30
|
|
|
|
|
|
|
my $parser = __PACKAGE__->new; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
while( defined( my $line = ) ) { |
33
|
|
|
|
|
|
|
try { |
34
|
|
|
|
|
|
|
my $ret = $parser->from_string( $line ); |
35
|
|
|
|
|
|
|
print Dumper( $ret ); |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
catch ( $e ) { |
38
|
|
|
|
|
|
|
print $e; |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
1; |