summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/ExtUtils/Install.pm4
-rw-r--r--lib/ExtUtils/Installed.pm4
-rw-r--r--lib/ExtUtils/Liblist.pm4
-rw-r--r--lib/ExtUtils/MM_Unix.pm56
-rw-r--r--lib/FindBin.pm2
-rw-r--r--lib/Pod/Html.pm243
-rw-r--r--op.c2
7 files changed, 165 insertions, 150 deletions
diff --git a/lib/ExtUtils/Install.pm b/lib/ExtUtils/Install.pm
index 3c183a3174..36c72219a9 100644
--- a/lib/ExtUtils/Install.pm
+++ b/lib/ExtUtils/Install.pm
@@ -224,7 +224,7 @@ sub inc_uninstall {
if ($nonono) {
if ($verbose) {
$Inc_uninstall_warn_handler ||= new ExtUtils::Install::Warn;
- $libdir =~ s|^\./|| ; # That's just cosmetics, no need to port. It looks prettier.
+ $libdir =~ s|^\./||s ; # That's just cosmetics, no need to port. It looks prettier.
$Inc_uninstall_warn_handler->add("$libdir/$file",$targetfile);
}
# if not verbose, we just say nothing
@@ -274,7 +274,7 @@ sub pm_to_blib {
utime($atime,$mtime+$Is_VMS,$fromto->{$_});
chmod(0444 | ( $mode & 0111 ? 0111 : 0 ),$fromto->{$_});
print "cp $_ $fromto->{$_}\n";
- next unless /\.pm$/;
+ next unless /\.pm\z/;
autosplit($fromto->{$_},$autodir);
}
}
diff --git a/lib/ExtUtils/Installed.pm b/lib/ExtUtils/Installed.pm
index da4a6536a0..6961c6fdd4 100644
--- a/lib/ExtUtils/Installed.pm
+++ b/lib/ExtUtils/Installed.pm
@@ -67,8 +67,8 @@ my $sub = sub
# Hack of the leading bits of the paths & convert to a module name
my $module = $File::Find::name;
- $module =~ s!$Config{archlib}/auto/(.*)/.packlist!$1!;
- $module =~ s!$Config{sitearch}/auto/(.*)/.packlist!$1!;
+ $module =~ s!$Config{archlib}/auto/(.*)/.packlist!$1!s;
+ $module =~ s!$Config{sitearch}/auto/(.*)/.packlist!$1!s;
my $modfile = "$module.pm";
$module =~ s!/!::!g;
diff --git a/lib/ExtUtils/Liblist.pm b/lib/ExtUtils/Liblist.pm
index c858236593..47ce3dcf87 100644
--- a/lib/ExtUtils/Liblist.pm
+++ b/lib/ExtUtils/Liblist.pm
@@ -115,7 +115,7 @@ sub _unix_os2_ext {
} elsif (-f ($fullname="$thispth/Slib$thislib$Config_libext")){
} elsif ($^O eq 'dgux'
&& -l ($fullname="$thispth/lib$thislib$Config_libext")
- && readlink($fullname) =~ /^elink:/) {
+ && readlink($fullname) =~ /^elink:/s) {
# Some of DG's libraries look like misconnected symbolic
# links, but development tools can follow them. (They
# look like this:
@@ -137,7 +137,7 @@ sub _unix_os2_ext {
# Now update library lists
# what do we know about this library...
- my $is_dyna = ($fullname !~ /\Q$Config_libext\E$/);
+ my $is_dyna = ($fullname !~ /\Q$Config_libext\E\z/);
my $in_perl = ($libs =~ /\B-l\Q$ {thislib}\E\b/s);
# Do not add it into the list if it is already linked in
diff --git a/lib/ExtUtils/MM_Unix.pm b/lib/ExtUtils/MM_Unix.pm
index e38043482f..4c8da339b8 100644
--- a/lib/ExtUtils/MM_Unix.pm
+++ b/lib/ExtUtils/MM_Unix.pm
@@ -80,13 +80,13 @@ path. On UNIX eliminated successive slashes and successive "/.".
sub canonpath {
my($self,$path) = @_;
my $node = '';
- if ( $^O eq 'qnx' && $path =~ s|^(//\d+)/|/| ) {
+ if ( $^O eq 'qnx' && $path =~ s|^(//\d+)/|/|s ) {
$node = $1;
}
$path =~ s|(?<=[^/])/+|/|g ; # xx////xx -> xx/xx
$path =~ s|(/\.)+/|/|g ; # xx/././xx -> xx/xx
- $path =~ s|^(\./)+|| unless $path eq "./"; # ./xx -> xx
- $path =~ s|(?<=[^/])/$|| ; # xx/ -> xx
+ $path =~ s|^(\./)+||s unless $path eq "./"; # ./xx -> xx
+ $path =~ s|(?<=[^/])/\z|| ; # xx/ -> xx
"$node$path";
}
@@ -738,7 +738,7 @@ sub dir_target {
my($targ) = $self->catfile($dir,'.exists');
# catfile may have adapted syntax of $dir to target OS, so...
if ($Is_VMS) { # Just remove file name; dirspec is often in macro
- ($targdir = $targ) =~ s:/?\.exists$::;
+ ($targdir = $targ) =~ s:/?\.exists\z::;
}
else { # while elsewhere we expect to see the dir separator in $targ
$targdir = dirname($targ);
@@ -1124,10 +1124,10 @@ Takes as argument a path and returns true, if it is an absolute path.
sub file_name_is_absolute {
my($self,$file) = @_;
if ($Is_Dos){
- $file =~ m{^([a-z]:)?[\\/]}i ;
+ $file =~ m{^([a-z]:)?[\\/]}is ;
}
else {
- $file =~ m:^/: ;
+ $file =~ m:^/:s ;
}
}
@@ -1310,7 +1310,7 @@ sub guess_name {
my($self) = @_;
use Cwd 'cwd';
my $name = basename(cwd());
- $name =~ s|[\-_][\d\.\-]+$||; # this is new with MM 5.00, we
+ $name =~ s|[\-_][\d\.\-]+\z||; # this is new with MM 5.00, we
# strip minus or underline
# followed by a float or some such
print "Warning: Guessing NAME [$name] from current directory name.\n";
@@ -1405,26 +1405,26 @@ sub init_dirscan { # --- File and Directory Lists (.xs .pm .pod etc)
if (-d $name){
next if -l $name; # We do not support symlinks at all
$dir{$name} = $name if (-f $self->catfile($name,"Makefile.PL"));
- } elsif ($name =~ /\.xs$/){
- my($c); ($c = $name) =~ s/\.xs$/.c/;
+ } elsif ($name =~ /\.xs\z/){
+ my($c); ($c = $name) =~ s/\.xs\z/.c/;
$xs{$name} = $c;
$c{$c} = 1;
- } elsif ($name =~ /\.c(pp|xx|c)?$/i){ # .c .C .cpp .cxx .cc
+ } elsif ($name =~ /\.c(pp|xx|c)?\z/i){ # .c .C .cpp .cxx .cc
$c{$name} = 1
unless $name =~ m/perlmain\.c/; # See MAP_TARGET
- } elsif ($name =~ /\.h$/i){
+ } elsif ($name =~ /\.h\z/i){
$h{$name} = 1;
- } elsif ($name =~ /\.PL$/) {
- ($pl_files{$name} = $name) =~ s/\.PL$// ;
+ } elsif ($name =~ /\.PL\z/) {
+ ($pl_files{$name} = $name) =~ s/\.PL\z// ;
} elsif (($Is_VMS || $Is_Dos) && $name =~ /[._]pl$/i) {
# case-insensitive filesystem, one dot per name, so foo.h.PL
# under Unix appears as foo.h_pl under VMS or fooh.pl on Dos
local($/); open(PL,$name); my $txt = <PL>; close PL;
if ($txt =~ /Extracting \S+ \(with variable substitutions/) {
- ($pl_files{$name} = $name) =~ s/[._]pl$//i ;
+ ($pl_files{$name} = $name) =~ s/[._]pl\z//i ;
}
else { $pm{$name} = $self->catfile('$(INST_LIBDIR)',$name); }
- } elsif ($name =~ /\.(p[ml]|pod)$/){
+ } elsif ($name =~ /\.(p[ml]|pod)\z/){
$pm{$name} = $self->catfile('$(INST_LIBDIR)',$name);
}
}
@@ -1499,7 +1499,7 @@ sub init_dirscan { # --- File and Directory Lists (.xs .pm .pod etc)
$self->{PM} = \%pm unless $self->{PM};
$self->{C} = [sort keys %c] unless $self->{C};
my(@o_files) = @{$self->{C}};
- $self->{O_FILES} = [grep s/\.c(pp|xx|c)?$/$self->{OBJ_EXT}/i, @o_files] ;
+ $self->{O_FILES} = [grep s/\.c(pp|xx|c)?\z/$self->{OBJ_EXT}/i, @o_files] ;
$self->{H} = [sort keys %h] unless $self->{H};
$self->{PL_FILES} = \%pl_files unless $self->{PL_FILES};
@@ -1545,9 +1545,9 @@ sub init_dirscan { # --- File and Directory Lists (.xs .pm .pod etc)
my %manifypods = (); # we collect the keys first, i.e. the files
# we have to convert to pod
foreach $name (keys %{$self->{PM}}) {
- if ($name =~ /\.pod$/ ) {
+ if ($name =~ /\.pod\z/ ) {
$manifypods{$name} = $self->{PM}{$name};
- } elsif ($name =~ /\.p[ml]$/ ) {
+ } elsif ($name =~ /\.p[ml]\z/ ) {
local *FH;
my($ispod)=0;
if (open(FH,"<$name")) {
@@ -1570,17 +1570,17 @@ sub init_dirscan { # --- File and Directory Lists (.xs .pm .pod etc)
# Remove "Configure.pm" and similar, if it's not the only pod listed
# To force inclusion, just name it "Configure.pod", or override MAN3PODS
foreach $name (keys %manifypods) {
- if ($name =~ /(config|setup).*\.pm/i) {
+ if ($name =~ /(config|setup).*\.pm/is) {
delete $manifypods{$name};
next;
}
my($manpagename) = $name;
- $manpagename =~ s/\.p(od|m|l)$//;
+ $manpagename =~ s/\.p(od|m|l)\z//;
if ($pods{HTMLLIB}) {
$self->{HTMLLIBPODS}->{$name} =
$self->catfile("\$(INST_HTMLLIBDIR)", "$manpagename.\$(HTMLEXT)");
}
- unless ($manpagename =~ s!^\W*lib\W+!!) { # everything below lib is ok
+ unless ($manpagename =~ s!^\W*lib\W+!!s) { # everything below lib is ok
$manpagename = $self->catfile(split(/::/,$self->{PARENT_NAME}),$manpagename);
}
if ($pods{MAN3}) {
@@ -1629,7 +1629,7 @@ sub init_main {
$modfname = &DynaLoader::mod2fname(\@modparts);
}
- ($self->{PARENT_NAME}, $self->{BASEEXT}) = $self->{NAME} =~ m!(?:([\w:]+)::)?(\w+)$! ;
+ ($self->{PARENT_NAME}, $self->{BASEEXT}) = $self->{NAME} =~ m!(?:([\w:]+)::)?(\w+)\z! ;
if (defined &DynaLoader::mod2fname) {
# As of 5.001m, dl_os2 appends '_'
@@ -2385,7 +2385,7 @@ $(MAKE_APERL_FILE) : $(FIRST_MAKEFILE)
my $incl;
my $xx;
- ($xx = $File::Find::name) =~ s,.*?/auto/,,;
+ ($xx = $File::Find::name) =~ s,.*?/auto/,,s;
$xx =~ s,/?$_,,;
$xx =~ s,/,::,g;
@@ -2403,7 +2403,7 @@ $(MAKE_APERL_FILE) : $(FIRST_MAKEFILE)
my $excl;
my $xx;
- ($xx = $File::Find::name) =~ s,.*?/auto/,,;
+ ($xx = $File::Find::name) =~ s,.*?/auto/,,s;
$xx =~ s,/?$_,,;
$xx =~ s,/,::,g;
@@ -2420,7 +2420,7 @@ $(MAKE_APERL_FILE) : $(FIRST_MAKEFILE)
# Once the patch to minimod.PL is in the distribution, I can
# drop it
- return if $File::Find::name =~ m:auto/$self->{FULLEXT}/$self->{BASEEXT}$self->{LIB_EXT}$:;
+ return if $File::Find::name =~ m:auto/$self->{FULLEXT}/$self->{BASEEXT}$self->{LIB_EXT}\z:;
use Cwd 'cwd';
$static{cwd() . "/" . $_}++;
}, grep( -d $_, @{$searchdirs || []}) );
@@ -2431,7 +2431,7 @@ $(MAKE_APERL_FILE) : $(FIRST_MAKEFILE)
$extra = [] unless $extra && ref $extra eq 'ARRAY';
for (sort keys %static) {
- next unless /\Q$self->{LIB_EXT}\E$/;
+ next unless /\Q$self->{LIB_EXT}\E\z/;
$_ = dirname($_) . "/extralibs.ld";
push @$extra, $_;
}
@@ -2516,7 +2516,7 @@ $tmp/perlmain\$(OBJ_EXT): $tmp/perlmain.c
$tmp/perlmain.c: $makefilename}, q{
}.$self->{NOECHO}.q{echo Writing $@
}.$self->{NOECHO}.q{$(PERL) $(MAP_PERLINC) -MExtUtils::Miniperl \\
- -e "writemain(grep s#.*/auto/##, split(q| |, q|$(MAP_STATIC)|))" > $@t && $(MV) $@t $@
+ -e "writemain(grep s#.*/auto/##s, split(q| |, q|$(MAP_STATIC)|))" > $@t && $(MV) $@t $@
};
push @m, "\t",$self->{NOECHO}.q{$(PERL) $(INSTALLSCRIPT)/fixpmain
@@ -3093,7 +3093,7 @@ sub prefixify {
my($self,$var,$sprefix,$rprefix) = @_;
$self->{uc $var} ||= $Config{lc $var};
$self->{uc $var} = VMS::Filespec::unixpath($self->{uc $var}) if $Is_VMS;
- $self->{uc $var} =~ s/\Q$sprefix\E/$rprefix/;
+ $self->{uc $var} =~ s/\Q$sprefix\E/$rprefix/s;
}
=item processPL (o)
diff --git a/lib/FindBin.pm b/lib/FindBin.pm
index 9d35f6f9c9..5d4c575cbc 100644
--- a/lib/FindBin.pm
+++ b/lib/FindBin.pm
@@ -102,7 +102,7 @@ BEGIN
if ($^O eq 'VMS')
{
- ($Bin,$Script) = VMS::Filespec::rmsexpand($0) =~ /(.*\])(.*)/;
+ ($Bin,$Script) = VMS::Filespec::rmsexpand($0) =~ /(.*\])(.*)/s;
($RealBin,$RealScript) = ($Bin,$Script);
}
else
diff --git a/lib/Pod/Html.pm b/lib/Pod/Html.pm
index 4df9599cf2..9c7aab7b38 100644
--- a/lib/Pod/Html.pm
+++ b/lib/Pod/Html.pm
@@ -1,23 +1,21 @@
package Pod::Html;
-
-use Pod::Functions;
-use Getopt::Long; # package for handling command-line parameters
-use File::Spec::Unix;
+use strict;
require Exporter;
-use vars qw($VERSION);
+
+use vars qw($VERSION @ISA @EXPORT);
$VERSION = 1.03;
-@ISA = Exporter;
+@ISA = qw(Exporter);
@EXPORT = qw(pod2html htmlify);
-use Cwd;
use Carp;
+use Config;
+use Cwd;
+use File::Spec::Unix;
+use Getopt::Long;
+use Pod::Functions;
use locale; # make \w work right in non-ASCII lands
-use strict;
-
-use Config;
-
=head1 NAME
Pod::Html - module to convert pod files to HTML
@@ -39,6 +37,33 @@ Pod::Html takes the following arguments:
=over 4
+=item backlink
+
+ --backlink="Back to Top"
+
+Adds "Back to Top" links in front of every HEAD1 heading (except for
+the first). By default, no backlink are being generated.
+
+=item css
+
+ --css=stylesheet
+
+Specify the URL of a cascading style sheet.
+
+=item flush
+
+ --flush
+
+Flushes the item and directory caches.
+
+=item header
+
+ --header
+ --noheader
+
+Creates header and footer blocks containing the text of the NAME
+section. By default, no headers are being generated.
+
=item help
--help
@@ -61,6 +86,14 @@ Pod::Html the root of the documentation tree.
Sets the base URL for the HTML files. When cross-references are made,
the HTML root is prepended to the URL.
+=item index
+
+ --index
+ --noindex
+
+Generate an index at the top of the HTML file. This is the default
+behaviour.
+
=item infile
--infile=name
@@ -68,26 +101,6 @@ the HTML root is prepended to the URL.
Specify the pod file to convert. Input is taken from STDIN if no
infile is specified.
-=item outfile
-
- --outfile=name
-
-Specify the HTML file to create. Output goes to STDOUT if no outfile
-is specified.
-
-=item podroot
-
- --podroot=name
-
-Specify the base directory for finding library pods.
-
-=item podpath
-
- --podpath=name:...:name
-
-Specify which subdirectories of the podroot contain pod files whose
-HTML converted forms can be linked-to in cross-references.
-
=item libpods
--libpods=name:...:name
@@ -97,39 +110,46 @@ List of page names (eg, "perlfunc") which contain linkable C<=item>s.
=item netscape
--netscape
+ --nonetscape
-Use Netscape HTML directives when applicable.
-
-=item nonetscape
+Use Netscape HTML directives when applicable. By default, they will
+B<not> be used.
- --nonetscape
+=item outfile
-Do not use Netscape HTML directives (default).
+ --outfile=name
-=item index
+Specify the HTML file to create. Output goes to STDOUT if no outfile
+is specified.
- --index
+=item podpath
-Generate an index at the top of the HTML file (default behaviour).
+ --podpath=name:...:name
-=item noindex
+Specify which subdirectories of the podroot contain pod files whose
+HTML converted forms can be linked-to in cross-references.
- --noindex
+=item podroot
-Do not generate an index at the top of the HTML file.
+ --podroot=name
+Specify the base directory for finding library pods.
-=item recurse
+=item quiet
- --recurse
+ --quiet
+ --noquiet
-Recurse into subdirectories specified in podpath (default behaviour).
+Don't display I<mostly harmless> warning messages. These messages
+will be displayed by default. But this is not the same as C<verbose>
+mode.
-=item norecurse
+=item recurse
+ --recurse
--norecurse
-Do not recurse into subdirectories specified in podpath.
+Recurse into subdirectories specified in podpath (default behaviour).
=item title
@@ -137,23 +157,12 @@ Do not recurse into subdirectories specified in podpath.
Specify the title of the resulting HTML file.
-=item css
-
- --css=stylesheet
-
-Specify the URL of a cascading style sheet.
-
=item verbose
--verbose
+ --noverbose
-Display progress messages.
-
-=item quiet
-
- --quiet
-
-Don't display I<mostly harmless> warning messages.
+Display progress messages. By default, they won't be displayed.
=back
@@ -211,6 +220,7 @@ my $recurse = 1; # recurse on subdirectories in $podpath.
my $quiet = 0; # not quiet by default
my $verbose = 0; # not verbose by default
my $doindex = 1; # non-zero if we should generate an index
+my $backlink = ''; # text for "back to top" links
my $listlevel = 0; # current list depth
my @listend = (); # the text to use to end the list.
my $after_lpar = 0; # set to true after a par in an =item
@@ -257,6 +267,7 @@ $recurse = 1; # recurse on subdirectories in $podpath.
$quiet = 0; # not quiet by default
$verbose = 0; # not verbose by default
$doindex = 1; # non-zero if we should generate an index
+$backlink = ''; # text for "back to top" links
$listlevel = 0; # current list depth
@listend = (); # the text to use to end the list.
$after_lpar = 0; # set to true after a par in an =item
@@ -526,8 +537,8 @@ END_OF_HEAD
finish_list();
# link to page index
- print HTML "<P><A HREF=\"#__index__\"><SMALL>page index</SMALL></A></P>\n"
- if $doindex and $index;
+ print HTML "<P><A HREF=\"#__index__\"><SMALL>$backlink</SMALL></A></P>\n"
+ if $doindex and $index and $backlink;
print HTML <<END_OF_TAIL;
$block
@@ -557,43 +568,50 @@ Usage: $0 --help --htmlroot=<name> --infile=<name> --outfile=<name>
--libpods=<name>:...:<name> --recurse --verbose --index
--netscape --norecurse --noindex
- --flush - flushes the item and directory caches.
- --help - prints this message.
- --htmlroot - http-server base directory from which all relative paths
- in podpath stem (default is /).
- --index - generate an index at the top of the resulting html
- (default).
- --infile - filename for the pod to convert (input taken from stdin
- by default).
- --libpods - colon-separated list of pages to search for =item pod
- directives in as targets of C<> and implicit links (empty
- by default). note, these are not filenames, but rather
- page names like those that appear in L<> links.
- --netscape - will use netscape html directives when applicable.
- --nonetscape - will not use netscape directives (default).
- --outfile - filename for the resulting html file (output sent to
- stdout by default).
- --podpath - colon-separated list of directories containing library
- pods. empty by default.
- --podroot - filesystem base directory from which all relative paths
- in podpath stem (default is .).
- --noindex - don't generate an index at the top of the resulting html.
- --norecurse - don't recurse on those subdirectories listed in podpath.
- --recurse - recurse on those subdirectories listed in podpath
- (default behavior).
- --title - title that will appear in resulting html file.
- --header - produce block header/footer
- --css - stylesheet URL
- --verbose - self-explanatory
- --quiet - supress some benign warning messages
+ --backlink - set text for "back to top" links (default: none).
+ --css - stylesheet URL
+ --flush - flushes the item and directory caches.
+ --[no]header - produce block header/footer (default is no headers).
+ --help - prints this message.
+ --htmldir - directory for resulting HTML files.
+ --htmlroot - http-server base directory from which all relative paths
+ in podpath stem (default is /).
+ --[no]index - generate an index at the top of the resulting html
+ (default behaviour).
+ --infile - filename for the pod to convert (input taken from stdin
+ by default).
+ --libpods - colon-separated list of pages to search for =item pod
+ directives in as targets of C<> and implicit links (empty
+ by default). note, these are not filenames, but rather
+ page names like those that appear in L<> links.
+ --[no]netscape - will use netscape html directives when applicable.
+ (default is not to use them).
+ --outfile - filename for the resulting html file (output sent to
+ stdout by default).
+ --podpath - colon-separated list of directories containing library
+ pods (empty by default).
+ --podroot - filesystem base directory from which all relative paths
+ in podpath stem (default is .).
+ --[no]quiet - supress some benign warning messages (default is off).
+ --[no]recurse - recurse on those subdirectories listed in podpath
+ (default behaviour).
+ --title - title that will appear in resulting html file.
+ --[no]verbose - self-explanatory (off by default).
END_OF_USAGE
sub parse_command_line {
- my ($opt_flush,$opt_help,$opt_htmldir,$opt_htmlroot,$opt_index,$opt_infile,$opt_libpods,$opt_netscape,$opt_outfile,$opt_podpath,$opt_podroot,$opt_recurse,$opt_title,$opt_verbose,$opt_css,$opt_header,$opt_quiet);
+ my ($opt_backlink,$opt_css,$opt_flush,$opt_header,$opt_help,$opt_htmldir,
+ $opt_htmlroot,$opt_index,$opt_infile,$opt_libpods,$opt_netscape,
+ $opt_outfile,$opt_podpath,$opt_podroot,$opt_quiet,$opt_recurse,
+ $opt_title,$opt_verbose);
+
unshift @ARGV, split ' ', $Config{pod2html} if $Config{pod2html};
my $result = GetOptions(
+ 'backlink=s' => \$opt_backlink,
+ 'css=s' => \$opt_css,
'flush' => \$opt_flush,
+ 'header!' => \$opt_header,
'help' => \$opt_help,
'htmldir=s' => \$opt_htmldir,
'htmlroot=s' => \$opt_htmlroot,
@@ -604,40 +622,37 @@ sub parse_command_line {
'outfile=s' => \$opt_outfile,
'podpath=s' => \$opt_podpath,
'podroot=s' => \$opt_podroot,
+ 'quiet!' => \$opt_quiet,
'recurse!' => \$opt_recurse,
'title=s' => \$opt_title,
- 'header' => \$opt_header,
- 'css=s' => \$opt_css,
- 'verbose' => \$opt_verbose,
- 'quiet' => \$opt_quiet,
+ 'verbose!' => \$opt_verbose,
);
usage("-", "invalid parameters") if not $result;
usage("-") if defined $opt_help; # see if the user asked for help
$opt_help = ""; # just to make -w shut-up.
- $podfile = $opt_infile if defined $opt_infile;
- $htmlfile = $opt_outfile if defined $opt_outfile;
- $htmldir = $opt_htmldir if defined $opt_htmldir;
-
@podpath = split(":", $opt_podpath) if defined $opt_podpath;
@libpods = split(":", $opt_libpods) if defined $opt_libpods;
+ $backlink = $opt_backlink if defined $opt_backlink;
+ $css = $opt_css if defined $opt_css;
+ $header = $opt_header if defined $opt_header;
+ $htmldir = $opt_htmldir if defined $opt_htmldir;
+ $htmlroot = $opt_htmlroot if defined $opt_htmlroot;
+ $doindex = $opt_index if defined $opt_index;
+ $podfile = $opt_infile if defined $opt_infile;
+ $netscape = $opt_netscape if defined $opt_netscape;
+ $htmlfile = $opt_outfile if defined $opt_outfile;
+ $podroot = $opt_podroot if defined $opt_podroot;
+ $quiet = $opt_quiet if defined $opt_quiet;
+ $recurse = $opt_recurse if defined $opt_recurse;
+ $title = $opt_title if defined $opt_title;
+ $verbose = $opt_verbose if defined $opt_verbose;
+
warn "Flushing item and directory caches\n"
if $opt_verbose && defined $opt_flush;
unlink($dircache, $itemcache) if defined $opt_flush;
-
- $htmlroot = $opt_htmlroot if defined $opt_htmlroot;
- $podroot = $opt_podroot if defined $opt_podroot;
-
- $doindex = $opt_index if defined $opt_index;
- $recurse = $opt_recurse if defined $opt_recurse;
- $title = $opt_title if defined $opt_title;
- $header = defined $opt_header ? 1 : 0;
- $css = $opt_css if defined $opt_css;
- $verbose = defined $opt_verbose ? 1 : 0;
- $quiet = defined $opt_quiet ? 1 : 0;
- $netscape = $opt_netscape if defined $opt_netscape;
}
@@ -1001,8 +1016,8 @@ sub process_head {
print HTML "<P>\n";
if( $level == 1 && ! $top ){
- print HTML "<A HREF=\"#__index__\"><SMALL>page index</SMALL></A>\n"
- if $hasindex;
+ print HTML "<A HREF=\"#__index__\"><SMALL>$backlink</SMALL></A>\n"
+ if $hasindex and $backlink;
print HTML "<HR>\n"
}
diff --git a/op.c b/op.c
index ed5a7eb510..9a3a187004 100644
--- a/op.c
+++ b/op.c
@@ -173,7 +173,7 @@ Perl_pad_allocmy(pTHX_ char *name)
}
}
if (PL_in_my == KEY_our) {
- while (off >= 0 && off <= top) {
+ while (off <= top) {
if ((sv = svp[off])
&& sv != &PL_sv_undef
&& ((SvFLAGS(sv) & SVpad_OUR) && GvSTASH(sv) == ourstash)