require 'test.pl';
use strict qw(refs subs);
-plan (98);
+plan(102);
# Test glob operations.
"deref of undef from list slice fails" );
}
+# test dereferencing errors
+{
+ eval q/ ${*STDOUT{IO}} /;
+ like($@, qr/Not a SCALAR reference/);
+ eval q/ @{*STDOUT{IO}} /;
+ like($@, qr/Not an ARRAY reference/);
+ eval q/ %{*STDOUT{IO}} /;
+ like($@, qr/Not a HASH reference/);
+ eval q/ &{*STDOUT{IO}} /;
+ like($@, qr/Not a CODE reference/);
+}
+
# Bit of a hack to make test.pl happy. There are 3 more tests after it leaves.
$test = curr_test();
curr_test($test + 3);