diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2003-09-08 11:32:46 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2003-09-08 11:32:46 +0000 |
commit | cba44c147cd2a58cf25f20a58f17a6c08443f669 (patch) | |
tree | a1f62f48126adeadf30df8ed59a08b831b257c65 /ext/PerlIO | |
parent | 3379a47e6a8a8a29a0a7b78ef4b6e654f17d10e1 (diff) | |
download | perl-cba44c147cd2a58cf25f20a58f17a6c08443f669.tar.gz |
The #21073 broke ext/B/t/o.t, retracting the #21073.
p4raw-id: //depot/perl@21082
Diffstat (limited to 'ext/PerlIO')
-rw-r--r-- | ext/PerlIO/scalar/scalar.xs | 2 | ||||
-rw-r--r-- | ext/PerlIO/t/scalar.t | 14 |
2 files changed, 2 insertions, 14 deletions
diff --git a/ext/PerlIO/scalar/scalar.xs b/ext/PerlIO/scalar/scalar.xs index 884cd5880a..0d56ecc613 100644 --- a/ext/PerlIO/scalar/scalar.xs +++ b/ext/PerlIO/scalar/scalar.xs @@ -23,7 +23,7 @@ PerlIOScalar_pushed(pTHX_ PerlIO * f, const char *mode, SV * arg, * or the _name_ of the scalar */ if (arg) { - if (SvROK(arg) && SvTYPE(SvRV(arg)) > SVt_NULL) { + if (SvROK(arg)) { s->var = SvREFCNT_inc(SvRV(arg)); if (!SvPOK(s->var)) (void)SvPV_nolen(s->var); diff --git a/ext/PerlIO/t/scalar.t b/ext/PerlIO/t/scalar.t index 01e12b047e..58ef97f6fe 100644 --- a/ext/PerlIO/t/scalar.t +++ b/ext/PerlIO/t/scalar.t @@ -10,7 +10,7 @@ BEGIN { } $| = 1; -print "1..25\n"; +print "1..24\n"; my $fh; my $var = "ok 2\n"; @@ -126,15 +126,3 @@ close $fh; { package P; sub TIESCALAR {bless{}} sub FETCH {"ok 24\n"} } tie $p, P; open $fh, '<', \$p; print <$fh>; - -# don't warn when writing to an undefined scalar - -{ - use warnings; - my $ok = 1; - local $SIG{__WARN__} = sub { $ok = 0; }; - open my $fh, '>', \my $scalar; - print $fh "foo"; - close $fh; - print $ok ? "ok 25\n" : "not ok 25\n"; -} |