]> granicus.if.org Git - git/commitdiff
git-remote-mediawiki: un-brace file handles in binmode calls
authorMatthieu Moy <Matthieu.Moy@imag.fr>
Wed, 3 Jul 2013 09:14:19 +0000 (11:14 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 3 Jul 2013 19:10:13 +0000 (12:10 -0700)
Commit e83d36b66fc turned "print STDOUT" into "print {*STDOUT}", as
suggested by perlcritic. Unfortunately, it also changed two "binmode
STDOUT" calls the same way, which does not work and yield a "Not a GLOB
reference" error.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/mw-to-git/git-remote-mediawiki.perl

index 71baf8ace8882e96eddab19e4b11448044b5190e..d09f5da6681fa62dbb87582031c12fe9dceddb69 100755 (executable)
@@ -635,9 +635,9 @@ sub literal_data_raw {
        my ($content) = @_;
        # Avoid confusion between size in bytes and in characters
        utf8::downgrade($content);
-       binmode {*STDOUT}, ':raw';
+       binmode STDOUT, ':raw';
        print {*STDOUT} 'data ', bytes::length($content), "\n", $content;
-       binmode {*STDOUT}, ':encoding(UTF-8)';
+       binmode STDOUT, ':encoding(UTF-8)';
        return;
 }