source: vendor/perl/5.8.8/t/lib/warnings/perly@ 3181

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

perl 5.8.8

File size: 687 bytes
Line 
1 perly.y AOK
2
3 dep() => deprecate("\"do\" to call subroutines")
4 Use of "do" to call subroutines is deprecated
5
6 sub fred {} do fred()
7 sub fred {} do fred(1)
8 sub fred {} $a = "fred" ; do $a()
9 sub fred {} $a = "fred" ; do $a(1)
10
11
12__END__
13# perly.y
14use warnings 'deprecated' ;
15sub fred {}
16do fred() ;
17do fred(1) ;
18$a = "fred" ;
19do $a() ;
20do $a(1) ;
21no warnings 'deprecated' ;
22do fred() ;
23do fred(1) ;
24$a = "fred" ;
25do $a() ;
26do $a(1) ;
27EXPECT
28Use of "do" to call subroutines is deprecated at - line 4.
29Use of "do" to call subroutines is deprecated at - line 5.
30Use of "do" to call subroutines is deprecated at - line 7.
31Use of "do" to call subroutines is deprecated at - line 8.
Note: See TracBrowser for help on using the repository browser.