| 1 | package TUI::Drivers::SystemError; | ||||||||||||||||||||
| 2 | # ABSTRACT: defines the class TSystemError | ||||||||||||||||||||
| 3 | |||||||||||||||||||||
| 4 | 5 | ▶ | use 5.010; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 5 | 5 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 6 | 5 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 7 | |||||||||||||||||||||
| 8 | 5 | our $VERSION = '2.000003'; | |||||||||||||||||||
| 9 | 5 | $VERSION =~ tr/_//d; | |||||||||||||||||||
| 10 | 5 | our $AUTHORITY = 'cpan:BRICKPOOL'; | |||||||||||||||||||
| 11 | |||||||||||||||||||||
| 12 | 5 | ▶ | use Exporter 'import'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 13 | 5 | our @EXPORT = qw( | |||||||||||||||||||
| 14 | TSystemError | ||||||||||||||||||||
| 15 | ); | ||||||||||||||||||||
| 16 | |||||||||||||||||||||
| 17 | 5 | ▶ | use Devel::StrictMode; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 18 | 5 | ▶ | use PerlX::Assert::PP; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 19 | 5 | ▶ | use TUI::toolkit::boolean; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 20 | |||||||||||||||||||||
| 21 | 5 | ▶ | use TUI::Drivers::HardwareInfo; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 22 | |||||||||||||||||||||
| 23 | sub TSystemError() { __PACKAGE__ } | ||||||||||||||||||||
| 24 | |||||||||||||||||||||
| 25 | # Global variables | ||||||||||||||||||||
| 26 | 5 | our $ctrlBreakHit = false; | |||||||||||||||||||
| 27 | 5 | our $saveCtrlBreak = false; | |||||||||||||||||||
| 28 | |||||||||||||||||||||
| 29 | 1 | ▶ | INIT { | ||||||||||||||||||
|
Subroutine
INIT: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 30 | 1 | TSystemError->resume(); | |||||||||||||||||||
| 31 | } | ||||||||||||||||||||
| 32 | |||||||||||||||||||||
| 33 | 5 | ▶ | END { | ||||||||||||||||||
|
Subroutine
END: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 34 | 5 | TSystemError->suspend(); | |||||||||||||||||||
| 35 | } | ||||||||||||||||||||
| 36 | |||||||||||||||||||||
| 37 | 2 | ▶ | sub resume { # void ($class) | ||||||||||||||||||
|
Subroutine
resume: called CC=2 SCAR=7.6
Pod
documented
| |||||||||||||||||||||
| 38 | 2 | ▶ | assert ( $_[0] and !ref $_[0] ); | ||||||||||||||||||
|
Condition33%1/3
$_[0] && !ref($_[0])
MC/DC0%0/2
$_[0] && !ref($_[0])
$_[0]
!ref($_[0])
Truth table33%1/3
A && not(B)
A= $_[0]B= !ref($_[0])
| |||||||||||||||||||||
| 39 | 2 | THardwareInfo->setCtrlBrkHandler( true ) unless STRICT; | |||||||||||||||||||
| 40 | 2 | return; | |||||||||||||||||||
| 41 | } | ||||||||||||||||||||
| 42 | |||||||||||||||||||||
| 43 | 6 | ▶ | sub suspend { # void ($class) | ||||||||||||||||||
|
Subroutine
suspend: called CC=2 SCAR=7.6
Pod
documented
| |||||||||||||||||||||
| 44 | 6 | ▶ | assert ( $_[0] and !ref $_[0] ); | ||||||||||||||||||
|
Condition33%1/3
$_[0] && !ref($_[0])
MC/DC0%0/2
$_[0] && !ref($_[0])
$_[0]
!ref($_[0])
Truth table33%1/3
A && not(B)
A= $_[0]B= !ref($_[0])
| |||||||||||||||||||||
| 45 | 6 | THardwareInfo->setCtrlBrkHandler( false ) unless STRICT; | |||||||||||||||||||
| 46 | 6 | return; | |||||||||||||||||||
| 47 | } | ||||||||||||||||||||
| 48 | |||||||||||||||||||||
| 49 | 5 | 1 | |||||||||||||||||||
| 50 | |||||||||||||||||||||
| 51 | __END__ | ||||||||||||||||||||