diff options
author | Craig A. Berry <craigberry@mac.com> | 2002-01-26 05:19:44 -0600 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-01-26 20:54:16 +0000 |
commit | 0cb07b6bbef2057a7b0d8b2623a8788c67377780 (patch) | |
tree | bfaa36cfa8cb1a37d0d13fccd1f1fb9b4b0bcbbb /lib | |
parent | 1cc75e1563d2449b9513627a4dada13ff1eb21a3 (diff) | |
download | perl-0cb07b6bbef2057a7b0d8b2623a8788c67377780.tar.gz |
Re: [PATCH @14417] vmsify Pod::Usage and its test
Message-Id: <a05101000b87895064ee3@[172.16.52.1]>
p4raw-id: //depot/perl@14430
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Pod/Usage.pm | 2 | ||||
-rw-r--r-- | lib/Pod/t/Usage.t | 15 |
2 files changed, 11 insertions, 6 deletions
diff --git a/lib/Pod/Usage.pm b/lib/Pod/Usage.pm index e69d460600..771cff451c 100644 --- a/lib/Pod/Usage.pm +++ b/lib/Pod/Usage.pm @@ -478,7 +478,7 @@ sub pod2usage { unless ((ref $opts{"-input"}) || (-e $opts{"-input"})) { my ($dirname, $basename) = ('', $opts{"-input"}); my $pathsep = ($^O =~ /^(?:dos|os2|MSWin32)$/) ? ";" - : (($^O eq 'MacOS') ? ',' : ":"); + : (($^O eq 'MacOS' || $^O eq 'VMS') ? ',' : ":"); my $pathspec = $opts{"-pathlist"} || $ENV{PATH} || $ENV{PERL5LIB}; my @paths = (ref $pathspec) ? @$pathspec : split($pathsep, $pathspec); diff --git a/lib/Pod/t/Usage.t b/lib/Pod/t/Usage.t index 4afbe5d118..cc03ad6390 100644 --- a/lib/Pod/t/Usage.t +++ b/lib/Pod/t/Usage.t @@ -48,16 +48,21 @@ SKIP: { } { # Test exit status from pod2usage() - my $exit = 42; + my $exit = ($^O eq 'VMS' ? 2 : 42); my $dev_null = File::Spec->devnull; my $args = join ", ", ( "-verbose => 0", "-exit => $exit", - "-output => q[$dev_null]", - "-input => q[$0]", + "-output => q{$dev_null}", + "-input => q{$0}", ); - my $prg = qq[pod2usage({ $args })]; - my @cmd = ( $^X, '-I../lib', '-MPod::Usage', '-e', $prg ); + my $cq = (($^O eq 'MSWin32' + || $^O eq 'NetWare' + || $^O eq 'VMS') ? '"' + : "'"); + my @params = ( "${cq}-I../lib$cq", "${cq}-MPod::Usage$cq", '-e' ); + my $prg = qq[${cq}pod2usage({ $args })$cq]; + my @cmd = ( $^X, @params, $prg ); is( system( @cmd ) >> 8, $exit, 'Exit status of pod2usage()' ); } |