| 1 | package | ||
| 2 | TestModule; | ||
| 3 | 4 | our $VERSION = '0.000001'; | |
| 4 | |||
| 5 | 4 | ▶ | use 5.014; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 4 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | 4 | ▶ | use Lexical::Failure; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | |||
| 10 | 4 | our $DIE_LINE = -1; | |
| 11 | |||
| 12 | sub import { | ||
| 13 | 19 | ▶ | my (undef, undef, $errors) = @_; |
|
Subroutine
import: called CC=1 SCAR=0.0
| |||
| 14 | 19 | ON_FAILURE($errors); | |
| 15 | } | ||
| 16 | |||
| 17 | sub dont_succeed { | ||
| 18 | |||
| 19 | 26 | ▶ | $DIE_LINE = __FILE__ . ' line ' . (__LINE__ + 1); |
|
Subroutine
dont_succeed: called CC=1 SCAR=0.2
Pod
undocumented
| |||
| 20 | 26 | fail "Didn't succeed"; | |
| 21 | |||
| 22 | 0 | return 'This value should never be returned'; | |
| 23 | } | ||
| 24 | |||
| 25 | # Module implementation here | ||
| 26 | |||
| 27 | |||
| 28 | 4 | 1; # Magic true value required at end of module | |