BEGIN {
chdir 't' if -d 't';
- unshift @INC, '../lib';
+ @INC = '../lib';
}
use warnings;
-print "1..40\n";
+print "1..41\n";
# type coersion on assignment
$foo = 'foo';
%x = ("ok 19" => "\n");
sub x { "ok 20\n" }
print ${*x{SCALAR}}, @{*x{ARRAY}}, %{*x{HASH}}, &{*x{CODE}};
+format x =
+ok 21
+.
+print ref *x{FORMAT} eq "FORMAT" ? "ok 21\n" : "not ok 21\n";
*x = *STDOUT;
-print *{*x{GLOB}} eq "*main::STDOUT" ? "ok 21\n" : "not ok 21\n";
-print {*x{IO}} "ok 22\n";
-print {*x{FILEHANDLE}} "ok 23\n";
+print *{*x{GLOB}} eq "*main::STDOUT" ? "ok 22\n" : "not ok 22\n";
+print {*x{IO}} "ok 23\n";
+print {*x{FILEHANDLE}} "ok 24\n";
# test if defined() doesn't create any new symbols
{
- my $test = 23;
+ my $test = 24;
my $a = "SYM000";
print "not " if defined *{$a};
# although it *should* if you're talking about magicals
{
- my $test = 29;
+ my $test = 30;
my $a = "]";
print "not " unless defined ${$a};
}
__END__
-ok 40
+ok 41