SP -= 4;
for (i = 1; i <= 3; i++) {
SV * const sv = SP[i];
+ SvGETMAGIC(sv);
if (!SvOK(sv))
continue;
if (SvREADONLY(sv)) {
Perl_croak_no_modify(aTHX);
}
if (!SvPOK(sv)) {
- Perl_ck_warner(aTHX_ packWARN(WARN_MISC), "Non-string passed as bitmask");
- SvPV_force_nolen(sv); /* force string conversion */
+ if (!SvPOKp(sv))
+ Perl_ck_warner(aTHX_ packWARN(WARN_MISC),
+ "Non-string passed as bitmask");
+ SvPV_force_nomg_nolen(sv); /* force string conversion */
}
j = SvCUR(sv);
if (maxlen < j)
use warnings 'misc';
$x = 1;
select $x, undef, undef, 1;
+sub TIESCALAR{bless[]} sub FETCH {"hello"} sub STORE{}
+tie $y, "";
+select $y, undef, undef, 1;
no warnings 'misc';
select $x, undef, undef, 1;
EXPECT
chdir 't' if -d 't';
@INC = '../lib';
require './test.pl';
- plan (tests => 292);
+ plan (tests => 295);
}
use strict;
check_count "$op $args\\\$tied_glob$postargs";
}
+{
+ no warnings;
+ $var = *foo;
+ $dummy = select $var, undef, undef, 0
+ ; check_count 'select $tied_glob, ...';
+ $var = \1;
+ $dummy = select $var, undef, undef, 0
+ ; check_count 'select $tied_ref, ...';
+ $var = undef;
+ $dummy = select $var, undef, undef, 0
+ ; check_count 'select $tied_undef, ...';
+}
+
###############################################
# Tests for $foo binop $foo #
###############################################