- my $podsourcedir = catfile($options{sourcedir}, $subdir);
- my $podglob = catfile($podsourcedir, "*.pod");
-
- foreach my $podfile (glob $podglob) {
- my $podname = basename($podfile, ".pod");
- my $podpath = catfile($podfile);
- my %podinfo = extract_pod_info($podpath,
- { debug => $options{debug},
- section => $section });
- my @podfiles = grep { $_ ne $podname } @{$podinfo{names}};
-
- my $updir = updir();
- my $name = uc $podname;
- my $suffix = { man => ".$podinfo{section}".($options{suffix} // ""),
- html => ".html" } -> {$options{type}};
- my $generate = { man => "pod2man --name=$name --section=$podinfo{section} --center=OpenSSL --release=$config{version} \"$podpath\"",
- html => "pod2html \"--podroot=$options{sourcedir}\" --htmldir=$updir --podpath=man1:man3:man5:man7 \"--infile=$podpath\" \"--title=$podname\""
- } -> {$options{type}};
- my $output_dir = catdir($options{destdir}, "man$podinfo{section}");
- my $output_file = $podname . $suffix;
- my $output_path = catfile($output_dir, $output_file);
-
- if (! $options{remove}) {
- my @output;
- print STDERR "DEBUG: Processing, using \"$generate\"\n"
- if $options{debug};
- unless ($options{"dry-run"}) {
- @output = `$generate`;
- map { s|href="http://man\.he\.net/(man\d/[^"]+)(?:\.html)?"|href="../$1.html"|g; } @output
- if $options{type} eq "html";
- }
- print STDERR "DEBUG: Done processing\n" if $options{debug};
+ foreach my $sourcedir (@{$options{sourcedir}}) {
+ my $podsourcedir = catfile($sourcedir, $subdir);
+ my $podglob = catfile($podsourcedir, "*.pod");
+
+ foreach my $podfile (glob $podglob) {
+ my $podname = basename($podfile, ".pod");
+ my $podpath = catfile($podfile);
+ my %podinfo = extract_pod_info($podpath,
+ { debug => $options{debug},
+ section => $section });
+ my @podfiles = grep { $_ ne $podname } @{$podinfo{names}};
+
+ my $updir = updir();
+ my $name = uc $podname;
+ my $suffix =
+ { man => ".$podinfo{section}".($options{suffix} // ""),
+ html => ".html" } -> {$options{type}};
+ my $generate =
+ { man => <<"_____",
+pod2man --name=$name --section=$podinfo{section} --center=OpenSSL --release=$config{version} "$podpath"
+_____
+ html => <<"_____",
+pod2html "--podroot=$sourcedir" --htmldir=$updir --podpath=man1:man3:man5:man7 "--infile=$podpath" "--title=$podname" --quiet
+_____
+ } -> {$options{type}};
+ my $output_dir = catdir($options{destdir}, "man$podinfo{section}");
+ my $output_file = $podname . $suffix;
+ my $output_path = catfile($output_dir, $output_file);