#!./perl
print "1..31\n";
BEGIN {
chdir 't' if -d 't';
}
return "" if (
# in 64-bit platforms hex warns for 32+ -bit values
);
return "not ";
}
# test blessing simple types
# blessing ref to object doesn't modify object
# reblessing does modify object
# local and my
{
}
# class is magic
"E" =~ /(.)/;
{
local $! = 1;
$! = 2; # attempt to avoid cached string
$! = 1;
# ref is ref to magic
{
{
package F;
}
$! = 2;
$! = 1;
$f1->test;
print "ok 21\n";
}
}
# ref is magic
### example of magic variable that is a reference??
# no class, or empty string (with a warning), or undef (with two)
{
use warnings;
$m = bless [];
print @w ? "not ok 24\t# @w\n" : "ok 24\n";
@w = ();
print @w != 1 ? "not ok 26\t# @w\n" : "ok 26\n";
@w = ();
print @w != 2 ? "not ok 28\t# @w\n" : "ok 28\n";
}
# class is a ref
# class is an overloaded ref
{
}
print $@ ? "not ok 31\t# $@" : "ok 31\n";