diff options
author | Anders Johnson <ajohnson@nvidia.com> | 2003-12-12 06:07:40 -0800 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2003-12-13 00:09:01 +0000 |
commit | 99a6169dfdb8b2356f889b4575ec1f2642a7f5fa (patch) | |
tree | f09daefe5d958713f0e4c9778c598545f867bbf8 /lib/Pod | |
parent | 308d26d578ee2df470607dca403b28c61f26c974 (diff) | |
download | perl-99a6169dfdb8b2356f889b4575ec1f2642a7f5fa.tar.gz |
RE: [perl #24610] Pod::Html infinite recursion
Message-ID: <33171CC36240D94EAF1FE584B1D14E0A06EC6F51@mail-sc-11.nvidia.com>
(with tweaks)
p4raw-id: //depot/perl@21884
Diffstat (limited to 'lib/Pod')
-rw-r--r-- | lib/Pod/Html.pm | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/lib/Pod/Html.pm b/lib/Pod/Html.pm index c4af19cb80..3f697205bc 100644 --- a/lib/Pod/Html.pm +++ b/lib/Pod/Html.pm @@ -3,7 +3,7 @@ use strict; require Exporter; use vars qw($VERSION @ISA @EXPORT @EXPORT_OK); -$VERSION = 1.0501; +$VERSION = 1.0502; @ISA = qw(Exporter); @EXPORT = qw(pod2html htmlify); @EXPORT_OK = qw(anchorify); @@ -78,6 +78,20 @@ section. By default, no headers are generated. Displays the usage message. +=item hiddendirs + + --hiddendirs + --nohiddendirs + +Include hidden directories in the search for POD's in podpath if recurse +is set. +The default is not to traverse any directory whose name begins with C<.>. +See L</"podpath"> and L</"recurse">. + +[This option is for backward compatibility only. +It's hard to imagine that one would usefully create a module with a +name component beginning with C<.>.] + =item htmldir --htmldir=name @@ -213,6 +227,7 @@ my $Css; my $Recurse; my $Quiet; +my $HiddenDirs; my $Verbose; my $Doindex; @@ -604,6 +619,7 @@ Usage: $0 --help --htmlroot=<name> --infile=<name> --outfile=<name> --flush - flushes the item and directory caches. --[no]header - produce block header/footer (default is no headers). --help - prints this message. + --hiddendirs - search hidden directories in podpath --htmldir - directory for resulting HTML files. --htmlroot - http-server base directory from which all relative paths in podpath stem (default is /). @@ -636,7 +652,7 @@ sub parse_command_line { my ($opt_backlink,$opt_cachedir,$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); + $opt_recurse,$opt_title,$opt_verbose,$opt_hiddendirs); unshift @ARGV, split ' ', $Config{pod2html} if $Config{pod2html}; my $result = GetOptions( @@ -646,6 +662,7 @@ sub parse_command_line { 'flush' => \$opt_flush, 'header!' => \$opt_header, 'help' => \$opt_help, + 'hiddendirs!'=> \$opt_hiddendirs, 'htmldir=s' => \$opt_htmldir, 'htmlroot=s' => \$opt_htmlroot, 'index!' => \$opt_index, @@ -676,6 +693,7 @@ sub parse_command_line { $Htmlroot = $opt_htmlroot if defined $opt_htmlroot; $Doindex = $opt_index if defined $opt_index; $Podfile = $opt_infile if defined $opt_infile; + $HiddenDirs = $opt_hiddendirs if defined $opt_hiddendirs; $Htmlfile = $opt_outfile if defined $opt_outfile; $Podroot = $opt_podroot if defined $opt_podroot; $Quiet = $opt_quiet if defined $opt_quiet; @@ -921,7 +939,9 @@ sub scan_dir { opendir(DIR, $dir) || die "$0: error opening directory $dir: $!\n"; while (defined($_ = readdir(DIR))) { - if (-d "$dir/$_" && $_ ne "." && $_ ne "..") { # directory + if (-d "$dir/$_" && $_ ne "." && $_ ne ".." + && ($HiddenDirs || !/^\./) + ) { # directory $Pages{$_} = "" unless defined $Pages{$_}; $Pages{$_} .= "$dir/$_:"; push(@subdirs, $_); |