| Line | |
|---|
| 1 | av.c
|
|---|
| 2 |
|
|---|
| 3 | Mandatory Warnings ALL TODO
|
|---|
| 4 | ------------------
|
|---|
| 5 | av_reify called on tied array [av_reify]
|
|---|
| 6 |
|
|---|
| 7 | Attempt to clear deleted array [av_clear]
|
|---|
| 8 |
|
|---|
| 9 | __END__
|
|---|
| 10 | # av.c
|
|---|
| 11 | $struct = [{foo => 1, bar => 2}, "FOO", "BAR"];
|
|---|
| 12 | use warnings 'deprecated';
|
|---|
| 13 | $a = $struct->{foo}; # This should warn.
|
|---|
| 14 | no warnings 'deprecated';
|
|---|
| 15 | $b = $struct->{bar}; # This should not warn.
|
|---|
| 16 | bless $struct, 'HlagHlag';
|
|---|
| 17 | use warnings 'deprecated';
|
|---|
| 18 | $a = $struct->{foo}; # This should warn.
|
|---|
| 19 | no warnings 'deprecated';
|
|---|
| 20 | $b = $struct->{bar}; # This should not warn.
|
|---|
| 21 | EXPECT
|
|---|
| 22 | Pseudo-hashes are deprecated at - line 4.
|
|---|
| 23 | Pseudo-hashes are deprecated at - line 9.
|
|---|
| 24 | ########
|
|---|
| 25 | package Foo;
|
|---|
| 26 | use warnings 'deprecated';
|
|---|
| 27 | use fields qw(foo bar);
|
|---|
| 28 | my $foo = fields::new('Foo');
|
|---|
| 29 | $foo->{foo} = 42;
|
|---|
| 30 | EXPECT
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.