1__END__ 2# NAME my $<special> 3my $!; 4EXPECT 5Can't use global $! in "my" at - line 1, near "my $!" 6Execution of - aborted due to compilation errors. 7######## 8# NAME OP_HELEM fields 9package Foo; 10use fields qw(a b); 11sub new { 12 my $class = shift; 13 return fields::new($class); 14} 15my Foo $f = Foo->new; 16$f->{c} = 1; 17EXPECT 18No such class field "c" in variable $f of type Foo at - line 8. 19######## 20# NAME OP_HSLICE fields 21package Foo; 22use fields qw(a b); 23sub new { 24 my $class = shift; 25 return fields::new($class); 26} 27my Foo $f = Foo->new; 28@$f{"a", "c"} = ( 1, 2 ); 29EXPECT 30No such class field "c" in variable $f of type Foo at - line 8. 31######## 32# NAME delete BAD 33delete $x; 34EXPECT 35delete argument is not a HASH or ARRAY element or slice at - line 1. 36######## 37# NAME exists BAD 38exists $x; 39EXPECT 40exists argument is not a HASH or ARRAY element or a subroutine at - line 1. 41######## 42# NAME exists non-sub 43exists &foo() 44EXPECT 45exists argument is not a subroutine name at - line 1. 46