In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/82505891db31e111f883f34516330c3d94c70486?hp=cfc889ad29c3a0868d6182fddbe612d7f51d6b11>
- Log ----------------------------------------------------------------- commit 82505891db31e111f883f34516330c3d94c70486 Author: Leon Timmermans <faw...@gmail.com> Date: Mon Jan 24 16:48:02 2011 +0100 Made binmode $fh, ':scalar' DWIM This silences this warning: $ perl -we 'open my $f, ">", \my $x; binmode $f, "scalar"' Use of uninitialized value in binmode at -e line 1. ----------------------------------------------------------------------- Summary of changes: ext/PerlIO-scalar/scalar.xs | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/ext/PerlIO-scalar/scalar.xs b/ext/PerlIO-scalar/scalar.xs index e081c17..b6cc5c1 100644 --- a/ext/PerlIO-scalar/scalar.xs +++ b/ext/PerlIO-scalar/scalar.xs @@ -22,7 +22,7 @@ PerlIOScalar_pushed(pTHX_ PerlIO * f, const char *mode, SV * arg, * using, otherwise arg (from binmode presumably) is either NULL * or the _name_ of the scalar */ - if (arg) { + if (arg && SvOK(arg)) { if (SvROK(arg)) { if (SvREADONLY(SvRV(arg)) && mode && *mode != 'r') { if (ckWARN(WARN_LAYER)) -- Perl5 Master Repository