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