| 1 | package # hide from PAUSE | ||||||||||
| 2 | Win32; | ||||||||||
| 3 | 2 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 2 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 1 | ▶ | sub AUTOLOAD { | ||||||||
|
Subroutine
AUTOLOAD: called CC=2 SCAR=6.9
| |||||||||||
| 7 | 2 | ▶ | no strict "vars"; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | |||||||||||
| 9 | # save the value of these variables | ||||||||||
| 10 | 1 | my @save = (0+$!, 0+$^E); | |||||||||
| 11 | |||||||||||
| 12 | # if what is asked is a Win32 function, load the real module | ||||||||||
| 13 | 1 | ▶ | if (index($AUTOLOAD, "Win32::") >= 0) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 14 | 1 | require Win32; | |||||||||
| 15 | 1 | Win32->import; | |||||||||
| 16 | } | ||||||||||
| 17 | |||||||||||
| 18 | # restore the values | ||||||||||
| 19 | 1 | ($!, $^E) = @save; | |||||||||
| 20 | |||||||||||
| 21 | # jump to the actual function | ||||||||||
| 22 | 1 | goto &$AUTOLOAD | |||||||||
| 23 | } | ||||||||||
| 24 | |||||||||||
| 25 | 2 | 1 | |||||||||
| 26 | |||||||||||
| 27 | __END__ | ||||||||||