t9700/test.pl: avoid bareword 'STDERR' in 3-argument open()
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> Tested-by: Tom G. Christensen <tgc@statsbiblioteket.dk> on RHEL 3, Perl 5.8.0 Signed-off-by: Junio C Hamano <gitster@pobox.com>
Brandon Casey committed
Sep 15, 2008 at 11:23 UTC
8409bb3708e1dd7c035617795c49e4ca7e17c56a
1 file changed
+1
-1
t/t9700/test.pl
+1
-1
@@ -38,7 +38,7 @@ is($r->get_color("color.test.slot1", "red"), $ansi_green, "get_color");
38
# Failure cases for config:
39
# Save and restore STDERR; we will probably extract this into a
40
# "dies_ok" method and possibly move the STDERR handling to Git.pm.
41
-open our $tmpstderr, ">&", STDERR or die "cannot save STDERR"; close STDERR;
41
+open our $tmpstderr, ">&STDERR" or die "cannot save STDERR"; close STDERR;
42
eval { $r->config("test.dupstring") };
43
ok($@, "config: duplicate entry in scalar context fails");
44
eval { $r->config_bool("test.boolother") };