Skip to content

Commit

Permalink
git-remote-mediawiki: un-brace file handles in binmode calls
Browse files Browse the repository at this point in the history
Commit e83d36b 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 <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
  • Loading branch information
moy authored and gitster committed Jul 3, 2013
1 parent 8c4e4ec commit 0e7c41c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contrib/mw-to-git/git-remote-mediawiki.perl
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 0e7c41c

Please sign in to comment.