| 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 | ▶ | use Exporter 'import'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 9 | 5 | our @EXPORT = qw( | |||||||||||||||||||
| 10 | TSystemError | ||||||||||||||||||||
| 11 | ); | ||||||||||||||||||||
| 12 | |||||||||||||||||||||
| 13 | 5 | ▶ | use Devel::StrictMode; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 14 | 5 | ▶ | use PerlX::Assert::PP; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 15 | 5 | ▶ | use TUI::toolkit::boolean; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 16 | |||||||||||||||||||||
| 17 | 5 | ▶ | use TUI::Drivers::HardwareInfo; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 18 | |||||||||||||||||||||
| 19 | sub TSystemError() { __PACKAGE__ } | ||||||||||||||||||||
| 20 | |||||||||||||||||||||
| 21 | # Global variables | ||||||||||||||||||||
| 22 | 5 | our $ctrlBreakHit = false; | |||||||||||||||||||
| 23 | 5 | our $saveCtrlBreak = false; | |||||||||||||||||||
| 24 | |||||||||||||||||||||
| 25 | 1 | ▶ | INIT { | ||||||||||||||||||
|
Subroutine
INIT: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 26 | 1 | TSystemError->resume(); | |||||||||||||||||||
| 27 | } | ||||||||||||||||||||
| 28 | |||||||||||||||||||||
| 29 | 5 | ▶ | END { | ||||||||||||||||||
|
Subroutine
END: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 30 | 5 | TSystemError->suspend(); | |||||||||||||||||||
| 31 | } | ||||||||||||||||||||
| 32 | |||||||||||||||||||||
| 33 | 2 | ▶ | sub resume { # void ($class) | ||||||||||||||||||
|
Subroutine
resume: called CC=2 SCAR=7.6
Pod
documented
| |||||||||||||||||||||
| 34 | 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])
| |||||||||||||||||||||
| 35 | 2 | THardwareInfo->setCtrlBrkHandler( true ) unless STRICT; | |||||||||||||||||||
| 36 | 2 | return; | |||||||||||||||||||
| 37 | } | ||||||||||||||||||||
| 38 | |||||||||||||||||||||
| 39 | 6 | ▶ | sub suspend { # void ($class) | ||||||||||||||||||
|
Subroutine
suspend: called CC=2 SCAR=7.6
Pod
documented
| |||||||||||||||||||||
| 40 | 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])
| |||||||||||||||||||||
| 41 | 6 | THardwareInfo->setCtrlBrkHandler( false ) unless STRICT; | |||||||||||||||||||
| 42 | 6 | return; | |||||||||||||||||||
| 43 | } | ||||||||||||||||||||
| 44 | |||||||||||||||||||||
| 45 | 5 | 1 | |||||||||||||||||||
| 46 | |||||||||||||||||||||
| 47 | __END__ | ||||||||||||||||||||