diff options
author | Nicholas Clark <nick@ccl4.org> | 2012-02-26 14:10:35 +0100 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2012-02-27 11:17:21 +0100 |
commit | 901455ecceca122044b675aeea6938e5a510ebb4 (patch) | |
tree | c646b575b4bb4df35343cd4b8ecab6709072fad1 /t/run/cloexec.t | |
parent | a892b81a8ad64d2a842be6138a2983f4b7c315df (diff) | |
download | perl-901455ecceca122044b675aeea6938e5a510ebb4.tar.gz |
Simplify platform specific code in t/run/cloexec.t
Don't assign to two lexical variables, $Is_VMS and $Is_Win32, only to use
them immediately for the same purpose - to skip the entire test.
In turn, there's no need to conditionally set $quote to a value suitable for
VMS or Win32, when neither OS ever runs the test.
The code has been this way since the file was added by commit
742218b34f58f961 in Nov 2006. Hence I don't think that the vestigial $quote
logic corresponds to pre-commit version that did run on these platforms.
Instead I infer that it has come from t/op/exec.t, used as a template for
running sub-scripts in a portable fashion.
Diffstat (limited to 't/run/cloexec.t')
-rw-r--r-- | t/run/cloexec.t | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/t/run/cloexec.t b/t/run/cloexec.t index 486df1eaad..5200377165 100644 --- a/t/run/cloexec.t +++ b/t/run/cloexec.t @@ -43,12 +43,9 @@ use strict; $|=1; -my $Is_VMS = $^O eq 'VMS'; -my $Is_Win32 = $^O eq 'MSWin32'; - # When in doubt, skip. -skip_all("VMS") if $Is_VMS; -skip_all("Win32") if $Is_Win32; +skip_all($^O) + if $^O eq 'VMS' or $^O eq 'MSWin32'; sub make_tmp_file { my ($fname, $fcontents) = @_; @@ -59,7 +56,7 @@ sub make_tmp_file { } my $Perl = which_perl(); -my $quote = $Is_VMS || $Is_Win32 ? '"' : "'"; +my $quote = "'"; my $tmperr = tempfile(); my $tmpfile1 = tempfile(); |