| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
require 5; |
|
3
|
|
|
|
|
|
|
package Pod::Simple::HTMLLegacy; |
|
4
|
1
|
|
|
1
|
|
761
|
use strict; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
47
|
|
|
5
|
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
7
|
use vars qw($VERSION); |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
46
|
|
|
7
|
1
|
|
|
1
|
|
808
|
use Getopt::Long; |
|
|
1
|
|
|
|
|
10672
|
|
|
|
1
|
|
|
|
|
5
|
|
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
$VERSION = "5.01"; |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
#-------------------------------------------------------------------------- |
|
12
|
|
|
|
|
|
|
# |
|
13
|
|
|
|
|
|
|
# This class is meant to thinly emulate bad old Pod::Html |
|
14
|
|
|
|
|
|
|
# |
|
15
|
|
|
|
|
|
|
# TODO: some basic docs |
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub pod2html { |
|
18
|
0
|
|
|
0
|
0
|
|
my @args = (@_); |
|
19
|
|
|
|
|
|
|
|
|
20
|
0
|
|
|
|
|
|
my( $verbose, $infile, $outfile, $title ); |
|
21
|
0
|
|
|
|
|
|
my $index = 1; |
|
22
|
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
{ |
|
24
|
0
|
|
|
|
|
|
my($help); |
|
|
0
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
my($netscape); # dummy |
|
27
|
0
|
|
|
|
|
|
local @ARGV = @args; |
|
28
|
0
|
0
|
|
|
|
|
GetOptions( |
|
29
|
|
|
|
|
|
|
"help" => \$help, |
|
30
|
|
|
|
|
|
|
"verbose!" => \$verbose, |
|
31
|
|
|
|
|
|
|
"infile=s" => \$infile, |
|
32
|
|
|
|
|
|
|
"outfile=s" => \$outfile, |
|
33
|
|
|
|
|
|
|
"title=s" => \$title, |
|
34
|
|
|
|
|
|
|
"index!" => \$index, |
|
35
|
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
"netscape!" => \$netscape, |
|
37
|
|
|
|
|
|
|
) or return bad_opts(@args); |
|
38
|
0
|
0
|
|
|
|
|
bad_opts(@args) if @ARGV; # it should be all switches! |
|
39
|
0
|
0
|
|
|
|
|
return help_message() if $help; |
|
40
|
|
|
|
|
|
|
} |
|
41
|
|
|
|
|
|
|
|
|
42
|
0
|
0
|
0
|
|
|
|
for($infile, $outfile) { $_ = undef unless defined and length } |
|
|
0
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
|
|
44
|
0
|
0
|
|
|
|
|
if($verbose) { |
|
45
|
0
|
|
|
|
|
|
warn sprintf "%s version %s\n", __PACKAGE__, $VERSION; |
|
46
|
0
|
|
|
|
|
|
warn "OK, processed args [@args] ...\n"; |
|
47
|
0
|
0
|
|
|
|
|
warn sprintf |
|
48
|
|
|
|
|
|
|
" Verbose: %s\n Index: %s\n Infile: %s\n Outfile: %s\n Title: %s\n", |
|
49
|
|
|
|
|
|
|
map defined($_) ? $_ : "(nil)", |
|
50
|
|
|
|
|
|
|
$verbose, $index, $infile, $outfile, $title, |
|
51
|
|
|
|
|
|
|
; |
|
52
|
0
|
|
|
|
|
|
*Pod::Simple::HTML::DEBUG = sub(){1}; |
|
53
|
|
|
|
|
|
|
} |
|
54
|
0
|
|
|
|
|
|
require Pod::Simple::HTML; |
|
55
|
0
|
|
|
|
|
|
Pod::Simple::HTML->VERSION(3); |
|
56
|
|
|
|
|
|
|
|
|
57
|
0
|
0
|
0
|
|
|
|
die "No such input file as $infile\n" |
|
58
|
|
|
|
|
|
|
if defined $infile and ! -e $infile; |
|
59
|
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
|
|
61
|
0
|
|
|
|
|
|
my $pod = Pod::Simple::HTML->new; |
|
62
|
0
|
0
|
|
|
|
|
$pod->force_title($title) if defined $title; |
|
63
|
0
|
|
|
|
|
|
$pod->index($index); |
|
64
|
0
|
|
|
|
|
|
return $pod->parse_from_file($infile, $outfile); |
|
65
|
|
|
|
|
|
|
} |
|
66
|
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
#-------------------------------------------------------------------------- |
|
68
|
|
|
|
|
|
|
|
|
69
|
0
|
|
|
0
|
0
|
|
sub bad_opts { die _help_message(); } |
|
70
|
0
|
|
|
0
|
0
|
|
sub help_message { print STDOUT _help_message() } |
|
71
|
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
#-------------------------------------------------------------------------- |
|
73
|
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
sub _help_message { |
|
75
|
|
|
|
|
|
|
|
|
76
|
0
|
|
|
0
|
|
|
join '', |
|
77
|
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
"[", __PACKAGE__, " version ", $VERSION, qq~] |
|
79
|
|
|
|
|
|
|
Usage: pod2html --help --infile= --outfile= |
|
80
|
|
|
|
|
|
|
--verbose --index --noindex |
|
81
|
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
Options: |
|
83
|
|
|
|
|
|
|
--help - prints this message. |
|
84
|
|
|
|
|
|
|
--[no]index - generate an index at the top of the resulting html |
|
85
|
|
|
|
|
|
|
(default behavior). |
|
86
|
|
|
|
|
|
|
--infile - filename for the pod to convert (input taken from stdin |
|
87
|
|
|
|
|
|
|
by default). |
|
88
|
|
|
|
|
|
|
--outfile - filename for the resulting html file (output sent to |
|
89
|
|
|
|
|
|
|
stdout by default). |
|
90
|
|
|
|
|
|
|
--title - title that will appear in resulting html file. |
|
91
|
|
|
|
|
|
|
--[no]verbose - self-explanatory (off by default). |
|
92
|
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
Note that pod2html is DEPRECATED, and this version implements only |
|
94
|
|
|
|
|
|
|
some of the options known to older versions. |
|
95
|
|
|
|
|
|
|
For more information, see 'perldoc pod2html'. |
|
96
|
|
|
|
|
|
|
~; |
|
97
|
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
} |
|
99
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
1; |
|
101
|
|
|
|
|
|
|
__END__ |