Commit | Line | Data |
599cee73 |
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 |
4438c4b7 |
14 | use warnings 'deprecated' ; |
599cee73 |
15 | sub fred {} |
16 | do fred() ; |
17 | do fred(1) ; |
18 | $a = "fred" ; |
19 | do $a() ; |
20 | do $a(1) ; |
4438c4b7 |
21 | no warnings 'deprecated' ; |
0453d815 |
22 | do fred() ; |
23 | do fred(1) ; |
24 | $a = "fred" ; |
25 | do $a() ; |
26 | do $a(1) ; |
599cee73 |
27 | EXPECT |
28 | Use of "do" to call subroutines is deprecated at - line 4. |
29 | Use of "do" to call subroutines is deprecated at - line 5. |
30 | Use of "do" to call subroutines is deprecated at - line 7. |
31 | Use of "do" to call subroutines is deprecated at - line 8. |