In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/c0e9ef6ae312c12d7dc286637b714009ab6e981c?hp=ff47f46246f9142bbc74ae2a4aef166a75a9deed>

- Log -----------------------------------------------------------------
commit c0e9ef6ae312c12d7dc286637b714009ab6e981c
Author: Jesse Vincent <je...@bestpractical.com>
Date:   Thu Jun 16 15:46:42 2011 -0400

    Added Shawn's canonical address

M       Porting/checkAUTHORS.pl

commit 86afc48d2295846be598ba62364cd3d15261dc17
Author: Shawn M Moore <sar...@bestpractical.com>
Date:   Fri Apr 22 17:35:35 2011 -0400

    Add Shawn M Moore to AUTHORS

M       AUTHORS

commit ef0e8b376d385bb910038404664c63b8a9c53e0f
Author: Shawn M Moore <sar...@bestpractical.com>
Date:   Tue Jun 14 19:43:39 2011 -0400

    Factor out ->program_name and use it in more places

M       dist/Pod-Perldoc/lib/Pod/Perldoc.pm

commit f505ea8ca238426fd115f89e54ba30c12df25d6a
Author: Shawn M Moore <sar...@bestpractical.com>
Date:   Tue Jun 14 19:37:32 2011 -0400

    Comment grammar and clarity fix

M       dist/Pod-Perldoc/lib/Pod/Perldoc.pm

commit f4c5a8fc16bd873fe7a0aa0a84f6b3ea9068c1a3
Author: Shawn M Moore <sar...@bestpractical.com>
Date:   Tue Jun 14 19:33:49 2011 -0400

    Consistently titlecase descriptions in -h

M       dist/Pod-Perldoc/lib/Pod/Perldoc.pm

commit 9bbf0c14a0db46fc1e84429b88c06bceaf57fadb
Author: Shawn M Moore <sar...@bestpractical.com>
Date:   Tue Jun 14 19:31:58 2011 -0400

    Use the same "$me OPTIONS" invocation as the other examples
    
        Otherwise when you have a subclass like cpandoc, it is inconsistent

M       dist/Pod-Perldoc/lib/Pod/Perldoc.pm
-----------------------------------------------------------------------

Summary of changes:
 AUTHORS                             |    1 +
 Porting/checkAUTHORS.pl             |    1 +
 dist/Pod-Perldoc/lib/Pod/Perldoc.pm |   27 +++++++++++++++++++--------
 3 files changed, 21 insertions(+), 8 deletions(-)

diff --git a/AUTHORS b/AUTHORS
index 0da37a1..88f4561 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -963,6 +963,7 @@ Sebastian Schmidt           <y...@yath.de>
 Sebastian Steinlechner         <steinlech...@gmx.net>
 Sérgio Durigan Júnior          <sergi...@linux.vnet.ibm.com>
 Shawn                          <svicalifor...@gmail.com>
+Shawn M Moore                  <sar...@gmail.com>
 Sherm Pendley                  <sh...@dot-app.org>
 Shigeya Suzuki                 <shig...@foretune.co.jp>
 Shimpei Yamashita              <shim...@socrates.patnet.caltech.edu>
diff --git a/Porting/checkAUTHORS.pl b/Porting/checkAUTHORS.pl
index baf8601..911ba13 100755
--- a/Porting/checkAUTHORS.pl
+++ b/Porting/checkAUTHORS.pl
@@ -787,6 +787,7 @@ rootbeer\100teleport.com                
rootbeer\100redcat.com
 +                                       tomphoenix\100unknown
 rurban\100x-ray.at                      rurban\100cpan.org
 
+sartak\100bestpractical.com             sartak\100gmail.com
 sadinoff\100olf.com                     danny-cpan\100sadinoff.com
 schubiger\100cpan.org                   steven\100accognoscere.org
 +                                       sts\100accognoscere.org
diff --git a/dist/Pod-Perldoc/lib/Pod/Perldoc.pm 
b/dist/Pod-Perldoc/lib/Pod/Perldoc.pm
index 083a6e9..e811e23 100644
--- a/dist/Pod-Perldoc/lib/Pod/Perldoc.pm
+++ b/dist/Pod-Perldoc/lib/Pod/Perldoc.pm
@@ -246,7 +246,7 @@ perldoc [options] -v PerlVariable
 
 Options:
     -h   Display this help message
-    -V   report version
+    -V   Report version
     -r   Recursive search (slow)
     -i   Ignore case
     -t   Display pod using pod2text instead of pod2man and nroff
@@ -263,7 +263,7 @@ Options:
     -M FormatterModuleNameToUse
     -w formatter_option:option_value
     -L translation_code   Choose doc translation (if any)
-    -X   use index if present (looks for pod.idx at $Config{archlib})
+    -X   Use index if present (looks for pod.idx at $Config{archlib})
     -q   Search the text of questions (not answers) in perlfaq[1-9]
     -f   Search Perl built-in functions
     -v   Search predefined Perl variables
@@ -292,18 +292,27 @@ EOF
 
 #..........................................................................
 
-sub usage_brief {
+sub program_name {
   my $me = $0;         # Editing $0 is unportable
 
   $me =~ s,.*[/\\],,; # get basename
-  
+
+  return $me;
+}
+
+#..........................................................................
+
+sub usage_brief {
+  my $self = shift;
+  my $me = $self->program_name;
+
   die <<"EOUSAGE";
 Usage: $me [-h] [-V] [-r] [-i] [-D] [-t] [-u] [-m] [-n nroffer_program] [-l] 
[-T] [-d output_filename] [-o output_format] [-M FormatterModuleNameToUse] [-w 
formatter_option:option_value] [-L translat ... [51 chars truncated]
        $me -f PerlFunc
        $me -q FAQKeywords
        $me -v PerlVar
 
-The -h option prints more help.  Also try "perldoc perldoc" to get
+The -h option prints more help.  Also try "$me perldoc" to get
 acquainted with the system.                        [Perldoc v$VERSION]
 EOUSAGE
 
@@ -484,7 +493,7 @@ sub find_good_formatter_class {
       
     } elsif(
       (IS_VMS or IS_MSWin32 or IS_Dos or IS_OS2)
-       # the alway case-insensitive fs's
+       # the always case-insensitive filesystems
       and $class_seen{lc("~$c")}++
     ) {
       DEBUG > 4 and print
@@ -549,10 +558,11 @@ sub formatter_sanity_check {
      ) || '';
     $ext = ".$ext" if length $ext;
     
+    my $me = $self->program_name;
     die
        "When using Perldoc to format with $formatter_class, you have to\n"
      . "specify -T or -dsomefile$ext\n"
-     . "See `perldoc perldoc' for more information on those switches.\n"
+     . "See `$me perldoc' for more information on those switches.\n"
     ;
   }
 }
@@ -773,12 +783,13 @@ sub grand_search_init {
                     ($self->opt_m ? "module" : "documentation") . " found for 
\"$_\".\n";
                 if ( @{ $self->{'found'} } ) {
                     print STDERR "However, try\n";
+                    my $me = $self->program_name;
                     for my $dir (@{ $self->{'found'} }) {
                         opendir(DIR, $dir) or die "opendir $dir: $!";
                         while (my $file = readdir(DIR)) {
                             next if ($file =~ /^\./s);
                             $file =~ s/\.(pm|pod)\z//;  # XXX: badfs
-                            print STDERR "\tperldoc $_\::$file\n";
+                            print STDERR "\t$me $_\::$file\n";
                         }
                         closedir(DIR)    or die "closedir $dir: $!";
                     }

--
Perl5 Master Repository

Reply via email to