diff options
author | Steve Hay <steve.m.hay@googlemail.com> | 2016-01-07 12:57:33 +0000 |
---|---|---|
committer | Steve Hay <steve.m.hay@googlemail.com> | 2016-01-07 12:57:33 +0000 |
commit | 1a938e7c61bdd3d4463b5e71b249ee52cc56f161 (patch) | |
tree | 689218782c8050f185368541e7128192af496f44 /cpan | |
parent | 3eb3ec0bf9c4674fdfb27825d452e2c7ef96692b (diff) | |
download | perl-1a938e7c61bdd3d4463b5e71b249ee52cc56f161.tar.gz |
Upgrade Pod-Usage from version 1.67 to 1.68
Diffstat (limited to 'cpan')
-rw-r--r-- | cpan/Pod-Usage/lib/Pod/Usage.pm | 28 | ||||
-rw-r--r-- | cpan/Pod-Usage/scripts/pod2usage.PL | 3 | ||||
-rw-r--r-- | cpan/Pod-Usage/t/pod/pod2usage2.t | 3 |
3 files changed, 25 insertions, 9 deletions
diff --git a/cpan/Pod-Usage/lib/Pod/Usage.pm b/cpan/Pod-Usage/lib/Pod/Usage.pm index a57d5f237f..cc4f2e1e4f 100644 --- a/cpan/Pod-Usage/lib/Pod/Usage.pm +++ b/cpan/Pod-Usage/lib/Pod/Usage.pm @@ -1,8 +1,9 @@ ############################################################################# # Pod/Usage.pm -- print usage messages for the running script. # -# Copyright (C) 1996-2000 by Bradford Appleton. All rights reserved. -# This file is part of "PodParser". PodParser is free software; +# Copyright (c) 1996-2000 by Bradford Appleton. All rights reserved. +# Copyright (c) 2001-2016 by Marek Rouchal. +# This file is part of "Pod-Usage". Pod-Usage is free software; # you can redistribute it and/or modify it under the same terms # as Perl itself. ############################################################################# @@ -11,7 +12,7 @@ package Pod::Usage; use strict; use vars qw($VERSION @ISA @EXPORT); -$VERSION = '1.67'; ## Current version of this package +$VERSION = '1.68'; ## Current version of this package require 5.006; ## requires this Perl version or later #use diagnostics; @@ -128,7 +129,7 @@ sub pod2usage { } ## Check for perldoc - my $progpath = $opts{perldoc} ? $opts{perldoc} : + my $progpath = $opts{'-perldoc'} ? $opts{'-perldoc'} : File::Spec->catfile($Config{scriptdirexp} || $Config{scriptdir}, 'perldoc'); @@ -149,7 +150,13 @@ sub pod2usage { if(defined $opts{-input} && $opts{-input} =~ /^\s*(\S.*?)\s*$/) { # the perldocs back to 5.005 should all have -F # without -F there are warnings in -T scripts - my @perldoc_cmd = ( $progpath, '-F', $1 ); + my $f = $1; + my @perldoc_cmd = ($progpath); + if ($opts{'-perldocopt'}) { + $opts{'-perldocopt'} =~ s/^\s+|\s+$//g; + push @perldoc_cmd, split(/\s+/, $opts{'-perldocopt'}); + } + push @perldoc_cmd, ('-F', $f); unshift @perldoc_cmd, $opts{'-perlcmd'} if $opts{'-perlcmd'}; system(@perldoc_cmd); if($?) { @@ -398,7 +405,8 @@ Pod::Usage - print a usage message from embedded pod documentation pod2usage( -verbose => 2, -perlcmd => $path_to_perl, - -perldoc => $path_to_perldoc ); + -perldoc => $path_to_perldoc, + -perldocopt => $perldoc_options ); =head1 ARGUMENTS @@ -533,13 +541,19 @@ specified. In case of special or unusual Perl installations, the -perlcmd option may be used to supply the path to a L<perl> executable which should run L<perldoc>. -=item C<-perldoc> +=item C<-perldoc> I<path-to-perldoc> By default, Pod::Usage will call L<perldoc> when -verbose >= 2 is specified. In case L<perldoc> is not installed where the L<perl> interpreter thinks it is (see L<Config>), the -perldoc option may be used to supply the correct path to L<perldoc>. +=item C<-perldocopt> I<string> + +By default, Pod::Usage will call L<perldoc> when -verbose >= 2 is specified. +The -perldocopt option may be used to supply options to L<perldoc>. The +string may contain several, space-separated options. + =back =head2 Formatting base class diff --git a/cpan/Pod-Usage/scripts/pod2usage.PL b/cpan/Pod-Usage/scripts/pod2usage.PL index 9102455a80..46617186d0 100644 --- a/cpan/Pod-Usage/scripts/pod2usage.PL +++ b/cpan/Pod-Usage/scripts/pod2usage.PL @@ -39,7 +39,8 @@ print OUT <<'!NO!SUBS!'; # pod2usage -- command to print usage messages from embedded pod docs # # Copyright (c) 1996-2000 by Bradford Appleton. All rights reserved. -# This file is part of "PodParser". PodParser is free software; +# Copyright (c) 2001-2016 by Marek Rouchal. +# This file is part of "Pod-Usage". Pod-Usage is free software; # you can redistribute it and/or modify it under the same terms # as Perl itself. ############################################################################# diff --git a/cpan/Pod-Usage/t/pod/pod2usage2.t b/cpan/Pod-Usage/t/pod/pod2usage2.t index 0ac4747fda..c0bbfdb574 100644 --- a/cpan/Pod-Usage/t/pod/pod2usage2.t +++ b/cpan/Pod-Usage/t/pod/pod2usage2.t @@ -252,7 +252,8 @@ ok (compare ($text, <<'EOT'), "Output test pod2usage with Pod::Find") or diag "G # # pod2usage( -verbose => 2, # -perlcmd => $path_to_perl, -# -perldoc => $path_to_perldoc ); +# -perldoc => $path_to_perldoc, +# -perldocopt => $perldoc_options ); # EOT |