xref: /onnv-gate/usr/src/cmd/perl/5.8.4/distrib/t/lib/warnings/av (revision 0:68f95e015346)
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"];
12use warnings 'deprecated';
13$a = $struct->{foo}; # This should warn.
14no warnings 'deprecated';
15$b = $struct->{bar}; # This should not warn.
16bless $struct, 'HlagHlag';
17use warnings 'deprecated';
18$a = $struct->{foo}; # This should warn.
19no warnings 'deprecated';
20$b = $struct->{bar}; # This should not warn.
21EXPECT
22Pseudo-hashes are deprecated at - line 4.
23Pseudo-hashes are deprecated at - line 9.
24########
25package Foo;
26use warnings 'deprecated';
27use fields qw(foo bar);
28my $foo = fields::new('Foo');
29$foo->{foo} = 42;
30EXPECT
31