[PATCH 2/3] t9700/test.pl: avoid bareword 'STDERR' in 3-argument open()
- From
Brandon Casey <casey@nrlssc.navy.mil>
- Date
- Sep 15, 2008, 16:23 UTC
- Message-ID
- <uWiPWIPu6IKkVafz9wdZ-sRK84QZuJQNOZM80bkfw24NxsVT-Z3J9g@cipher.nrlssc.navy.mil>
- In-Reply-To
- <T5Id5zYBlKyKEhZkMsE3QTI2aU3XMiwpfpsPq89cvXrakbyGShLtQw@cipher.nrlssc.navy.mil>
Some versions of perl complain when 'STDERR' is used as the third argument in the 3-argument form of open(). Convert to the 2-argument form which is described for duping STDERR in my second edition camel book.
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> --- t/t9700/test.pl | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/t/t9700/test.pl b/t/t9700/test.pl index 732133e..f777b08 100755 --- a/t/t9700/test.pl +++ b/t/t9700/test.pl @@ -34,7 +34,7 @@ is($r->get_color("color.test.slot1", "red"), $ansi_green, "get_color"); # Failure cases for config: # Save and restore STDERR; we will probably extract this into a # "dies_ok" method and possibly move the STDERR handling to Git.pm. -open our $tmpstderr, ">&", STDERR or die "cannot save STDERR"; close STDERR; +open our $tmpstderr, ">&STDERR" or die "cannot save STDERR"; close STDERR; eval { $r->config("test.dupstring") }; ok($@, "config: duplicate entry in scalar context fails"); eval { $r->config_bool("test.boolother") };
-- 1.6.0.1.244.gdc19