6 use Scalar::Util qw(reftype);
7 use vars qw($t $y $x *F);
10 # Ensure we do not trigger and tied methods
23 # [ IO => *STDIN{IO} ] the internal sv_reftype returns UNKNOWN
26 print "1..", @test*4, "\n";
29 foreach $test (@test) {
30 my($type,$what) = @$test;
32 foreach $pack (undef,"ABC","0",undef) {
34 my $res = reftype($what);
35 printf "# %s - %s\n", map { defined($_) ? $_ : 'undef' } $type,$res;
36 print "not " if $type ? $res ne $type : defined($res);
37 bless $what, $pack if $type && defined $pack;
38 print "ok ",$i++,"\n";
44 sub TIEHANDLE { bless {} }
48 warn "$AUTOLOAD called";
49 exit 1; # May be in an eval