#!./perl
# Test || in weird situations.
chdir 't' if -d 't';
}
}
print "# FETCH! ${$_[0]}\n";
return ${$_[0]}--;
}
my ($a, $b, $c);
$! = 1;
$a = $!;
$c = $a || $b;
is($c+0, $a_num);
# force numeric context.
$a =~ /./g
or die "Match failed for some reason";
# Make $a magic
$c = $a || $b;
is($c+0, $a_num);
# force numeric context.
$c = $a;
is($c, 3, 'Single FETCH on tied scalar');
$c = $a;
is($c, 2, ' $tied = $var');
$c = $a || $b;
{
local $TODO = 'Double FETCH'; is($c, 1, ' $tied || $var'); }