[interchange] Fix unintentionally short local scoping
David Christensen <[email protected]> Tue, 14 Nov 2017 20:47:31 +0000
| Newsgroups | gmane.comp.web.interchange.cvs |
|---|---|
| Message-ID | <[email protected]> |
commit b6ebec3b90f69f6437991c1fc3f6fbe52d1f3cc4 Author: David Christensen <[email protected]> Date: Mon Nov 13 15:34:23 2017 -0600 Fix unintentionally short local scoping lib/Vend/File.pm | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) --- diff --git a/lib/Vend/File.pm b/lib/Vend/File.pm index b749e1e..475e15b 100644 --- a/lib/Vend/File.pm +++ b/lib/Vend/File.pm @@ -96,10 +96,8 @@ sub writefile { } # We have checked for beginning > or | previously open(MVLOGDATA, $file) or die "open\n"; - if ($encoding) { - local $PerlIO::encoding::fallback = $fallback; - binmode(MVLOGDATA, ":encoding($encoding)"); - } + local $PerlIO::encoding::fallback = $fallback if $encoding; + binmode(MVLOGDATA, ":encoding($encoding)") if $encoding; lockfile(\*MVLOGDATA, 1, 1) or die "lock\n"; seek(MVLOGDATA, 0, 2) or die "seek\n";