source: trunk/essentials/dev-lang/perl/t/lib/warnings/av@ 3184

Last change on this file since 3184 was 3181, checked in by bird, 19 years ago

perl 5.8.8

File size: 739 bytes
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"];
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
Note: See TracBrowser for help on using the repository browser.