3 package Pod::Simple::HTMLLegacy;
11 #--------------------------------------------------------------------------
13 # This class is meant to thinly emulate bad old Pod::Html
15 # TODO: some basic docs
20 my( $verbose, $infile, $outfile, $title );
26 my($netscape); # dummy
30 "verbose!" => \$verbose,
31 "infile=s" => \$infile,
32 "outfile=s" => \$outfile,
36 "netscape!" => \$netscape,
37 ) or return bad_opts(@args);
38 bad_opts(@args) if @ARGV; # it should be all switches!
39 return help_message() if $help;
42 for($infile, $outfile) { $_ = undef unless defined and length }
45 warn sprintf "%s version %s\n", __PACKAGE__, $VERSION;
46 warn "OK, processed args [@args] ...\n";
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,
52 *Pod::Simple::HTML::DEBUG = sub(){1};
54 require Pod::Simple::HTML;
55 Pod::Simple::HTML->VERSION(3);
57 die "No such input file as $infile\n"
58 if defined $infile and ! -e $infile;
61 my $pod = Pod::Simple::HTML->new;
62 $pod->force_title($title) if defined $title;
64 return $pod->parse_from_file($infile, $outfile);
67 #--------------------------------------------------------------------------
69 sub bad_opts { die _help_message(); }
70 sub help_message { print STDOUT _help_message() }
72 #--------------------------------------------------------------------------
78 "[", __PACKAGE__, " version ", $VERSION, qq~]
79 Usage: pod2html --help --infile=<name> --outfile=<name>
80 --verbose --index --noindex
83 --help - prints this message.
84 --[no]index - generate an index at the top of the resulting html
86 --infile - filename for the pod to convert (input taken from stdin
88 --outfile - filename for the resulting html file (output sent to
90 --title - title that will appear in resulting html file.
91 --[no]verbose - self-explanatory (off by default).
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'.
103 OVER the underpass! UNDER the overpass! Around the FUTURE and BEYOND REPAIR!!