From: Craig A. Berry Date: Sat, 26 Jan 2002 11:19:44 +0000 (-0600) Subject: Re: [PATCH @14417] vmsify Pod::Usage and its test X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0cb07b6bbef2057a7b0d8b2623a8788c67377780;p=p5sagit%2Fp5-mst-13.2.git Re: [PATCH @14417] vmsify Pod::Usage and its test Message-Id: p4raw-id: //depot/perl@14430 --- diff --git a/lib/Pod/Usage.pm b/lib/Pod/Usage.pm index e69d460..771cff4 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 4afbe5d..cc03ad6 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()' ); }