Fix #15283 - binmode() was not passing mode
[p5sagit/p5-mst-13.2.git] / utils / perldoc.PL
index 2f60c6e..76caaab 100644 (file)
@@ -123,9 +123,8 @@ Options:
 PageName|ModuleName...
          is the name of a piece of documentation that you want to look at. You
          may either give a descriptive name of the page (as in the case of
-         `perlfunc') the name of a module, either like `Term::Info',
-         `Term/Info', the partial name of a module, like `info', or
-         `makemaker', or the name of a program, like `perldoc'.
+         `perlfunc') the name of a module, either like `Term::Info' or like
+         `Term/Info', or the name of a program, like `perldoc'.
 
 BuiltinFunction
          is the name of a perl function.  Will extract documentation from
@@ -342,7 +341,7 @@ sub searchfor {
     for ($i=0; $i<@dirs; $i++) {
        $dir = $dirs[$i];
        ($dir = VMS::Filespec::unixpath($dir)) =~ s!/\z!! if $Is_VMS;
-       if (       ( $ret = check_file $dir,"$s.pod")
+       if (       (! $opt_m && ( $ret = check_file $dir,"$s.pod"))
                or ( $ret = check_file $dir,"$s.pm")
                or ( $ret = check_file $dir,$s)
                or ( $Is_VMS and
@@ -458,7 +457,8 @@ foreach (@pages) {
            print STDERR "Loosely found as @files\n" if $opt_v;
        }
        else {
-           print STDERR "No documentation found for \"$_\".\n";
+           print STDERR "No " .
+               ($opt_m ? "module" : "documentation") . " found for \"$_\".\n";
            if (@global_found) {
                print STDERR "However, try\n";
                for my $dir (@global_found) {
@@ -588,7 +588,7 @@ EOD
            $found = 1;
            push @pod, "=head1 Found in $ARGV\n\n" unless $found_in{$ARGV}++;
        }
-       elsif (/^=head2/) {
+       elsif (/^=head[12]/) {
            $found = 0;
        }
        next unless $found;
@@ -690,6 +690,9 @@ the perl library modules.
 Your system may also have man pages installed for those modules, in
 which case you can probably just use the man(1) command.
 
+If you are looking for a table of contents to the Perl library modules
+documentation, see the L<perltoc> page.
+
 =head1 OPTIONS
 
 =over 5
@@ -756,10 +759,7 @@ run.
 
 The item you want to look up.  Nested modules (such as C<File::Basename>)
 are specified either as C<File::Basename> or C<File/Basename>.  You may also
-give a descriptive name of a page, such as C<perlfunc>. You may also give a
-partial or wrong-case name, such as "basename" for "File::Basename", but
-this will be slower, if there is more then one page with the same partial
-name, you will only get the first one.
+give a descriptive name of a page, such as C<perlfunc>.
 
 =back