| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Amazon::API::Pod::Parser; |
|
2
|
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
20
|
use strict; |
|
|
3
|
|
|
|
|
7
|
|
|
|
3
|
|
|
|
|
90
|
|
|
4
|
3
|
|
|
3
|
|
13
|
use warnings; |
|
|
3
|
|
|
|
|
6
|
|
|
|
3
|
|
|
|
|
77
|
|
|
5
|
|
|
|
|
|
|
|
|
6
|
3
|
|
|
3
|
|
1302
|
use Amazon::API::Pod::Simple::Text; |
|
|
3
|
|
|
|
|
8
|
|
|
|
3
|
|
|
|
|
56
|
|
|
7
|
|
|
|
|
|
|
|
|
8
|
3
|
|
|
3
|
|
110
|
use parent qw{Exporter}; |
|
|
3
|
|
|
|
|
10
|
|
|
|
3
|
|
|
|
|
18
|
|
|
9
|
|
|
|
|
|
|
|
|
10
|
3
|
|
|
3
|
|
157
|
use Carp; |
|
|
3
|
|
|
|
|
10
|
|
|
|
3
|
|
|
|
|
151
|
|
|
11
|
3
|
|
|
3
|
|
18
|
use IO::Scalar; |
|
|
3
|
|
|
|
|
7
|
|
|
|
3
|
|
|
|
|
87
|
|
|
12
|
3
|
|
|
3
|
|
15
|
use ReadonlyX; |
|
|
3
|
|
|
|
|
6
|
|
|
|
3
|
|
|
|
|
899
|
|
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
Readonly::Scalar my $EMPTY => q{}; |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
our $VERSION = '0.01'; |
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
our @EXPORT_OK = qw{ get_pod_section }; |
|
19
|
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
caller or __PACKAGE__->main(@ARGV); |
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
######################################################################## |
|
23
|
|
|
|
|
|
|
sub get_pod_section { |
|
24
|
|
|
|
|
|
|
######################################################################## |
|
25
|
0
|
|
|
0
|
0
|
|
my ( $file, $section ) = @_; |
|
26
|
|
|
|
|
|
|
|
|
27
|
0
|
0
|
|
|
|
|
croak "no such file [$file]\n", |
|
28
|
|
|
|
|
|
|
if !-e $file; |
|
29
|
|
|
|
|
|
|
|
|
30
|
0
|
|
|
|
|
|
my $pod_simple = Amazon::API::Pod::Simple::Text->new; |
|
31
|
|
|
|
|
|
|
|
|
32
|
0
|
0
|
|
|
|
|
if ($section) { |
|
33
|
0
|
|
|
|
|
|
$Amazon::API::Pod::Simple::Text::SECTION = $section; |
|
34
|
|
|
|
|
|
|
} |
|
35
|
|
|
|
|
|
|
|
|
36
|
0
|
|
|
|
|
|
my $output = $EMPTY; |
|
37
|
|
|
|
|
|
|
|
|
38
|
0
|
|
|
|
|
|
my $fh = IO::Scalar->new( \$output ); |
|
39
|
|
|
|
|
|
|
|
|
40
|
0
|
|
|
|
|
|
$pod_simple->output_fh($fh); |
|
41
|
0
|
|
|
|
|
|
$pod_simple->parse_file($file); |
|
42
|
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
# strip leading/trailing blank lines |
|
44
|
0
|
|
|
|
|
|
$output =~ s/\s*\n+\z//xsm; |
|
45
|
0
|
|
|
|
|
|
$output =~ s/\A\s*\s\n+(.*)\z/$1/xsm; |
|
46
|
|
|
|
|
|
|
|
|
47
|
0
|
|
|
|
|
|
return $output; |
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
} |
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
######################################################################## |
|
52
|
|
|
|
|
|
|
sub main { |
|
53
|
|
|
|
|
|
|
######################################################################## |
|
54
|
0
|
|
|
0
|
0
|
|
my ( $self, $file, $section ) = @_; |
|
55
|
|
|
|
|
|
|
|
|
56
|
0
|
|
|
|
|
|
print get_pod_section( $file, $section ); |
|
57
|
|
|
|
|
|
|
|
|
58
|
0
|
|
|
|
|
|
exit 0; |
|
59
|
|
|
|
|
|
|
} |
|
60
|
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
1; |
|
62
|
|
|
|
|
|
|
|