Front page | perl.vmsperl |
Postings from January 2002
Re: [PATCH @14417] vmsify Pod::Usage and its test
Thread Previous
|
Thread Next
From:
Craig A. Berry
Date:
January 26, 2002 09:19
Subject:
Re: [PATCH @14417] vmsify Pod::Usage and its test
Message ID:
a05101000b87895064ee3@[172.16.52.1]
At 1:45 AM +0200 1/26/02, Jarkko Hietaniemi wrote:
>On Fri, Jan 25, 2002 at 05:46:50PM -0600, Craig A. Berry wrote:
> > I'm under the impression that double quotes around
> > parameters work everywhere but if that's not true we'll have to special case
>> this further.
>
>t/test.pl has:
>
> if ($is_mswin || $is_netware || $is_vms) {
> $runperl .= qq( -e ") . $args{prog} . qq(");
> }
> else {
> $runperl .= qq( -e ') . $args{prog} . qq(');
> }
OK, here's a revised patch which I hope will work everywhere:
--- lib/Pod/Usage.pm;-0 Thu Jan 3 10:49:15 2002
+++ lib/Pod/Usage.pm Sat Jan 26 09:54:48 2002
@@ -478,7 +478,7 @@
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);
--- lib/Pod/t/Usage.t;-0 Sat Jan 19 13:00:19 2002
+++ lib/Pod/t/Usage.t Sat Jan 26 11:11:14 2002
@@ -48,16 +48,21 @@
}
{ # 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()' );
}
[end of patch]
--
____________________________________________
Craig A. Berry
mailto:craigberry@mac.com
"Literary critics usually know what they're
talking about. Even if they're wrong."
-- Perl creator Larry Wall
Thread Previous
|
Thread Next