| 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
|
|---|
| 14 | use warnings 'deprecated' ;
|
|---|
| 15 | sub fred {}
|
|---|
| 16 | do fred() ;
|
|---|
| 17 | do fred(1) ;
|
|---|
| 18 | $a = "fred" ;
|
|---|
| 19 | do $a() ;
|
|---|
| 20 | do $a(1) ;
|
|---|
| 21 | no warnings 'deprecated' ;
|
|---|
| 22 | do fred() ;
|
|---|
| 23 | do fred(1) ;
|
|---|
| 24 | $a = "fred" ;
|
|---|
| 25 | do $a() ;
|
|---|
| 26 | do $a(1) ;
|
|---|
| 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.
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.