| 1 | ############################################################################## | ||||||||||||||||||||
| 2 | # | ||||||||||||||||||||
| 3 | # Exception::Sink::Class | ||||||||||||||||||||
| 4 | # Copyright (c) 2006-2024 Vladi Belperchinov-Shabanski "Cade" | ||||||||||||||||||||
| 5 | # <cade@noxrun.com> <cade@bis.bg> <cade@cpan.org> | ||||||||||||||||||||
| 6 | # http://cade.noxrun.com/ | ||||||||||||||||||||
| 7 | # | ||||||||||||||||||||
| 8 | # GPLv2 | ||||||||||||||||||||
| 9 | # | ||||||||||||||||||||
| 10 | ############################################################################## | ||||||||||||||||||||
| 11 | # | ||||||||||||||||||||
| 12 | # sink exception class | ||||||||||||||||||||
| 13 | # | ||||||||||||||||||||
| 14 | ############################################################################## | ||||||||||||||||||||
| 15 | package Exception::Sink::Class; | ||||||||||||||||||||
| 16 | 1 | ▶ | use Exception::Sink; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 17 | 1 | ▶ | use overload ( '""' => 'stringify' ); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 18 | 1 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 19 | |||||||||||||||||||||
| 20 | ############################################################################## | ||||||||||||||||||||
| 21 | |||||||||||||||||||||
| 22 | sub new | ||||||||||||||||||||
| 23 | { | ||||||||||||||||||||
| 24 | 0 | ▶ | my $class = shift; | ||||||||||||||||||
|
Subroutine
new: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||
| 25 | 0 | ▶ | $class = ref( $class ) || $class; | ||||||||||||||||||
|
Condition0%0/3
ref $class || $class
MC/DC0%0/2
ref $class || $class
ref $class
$class
Truth table0%0/3
A || B
A= ref $classB= $class
| |||||||||||||||||||||
| 26 | 0 | my $self = { @_ }; | |||||||||||||||||||
| 27 | 0 | bless $self, $class; | |||||||||||||||||||
| 28 | 0 | return $self; | |||||||||||||||||||
| 29 | } | ||||||||||||||||||||
| 30 | |||||||||||||||||||||
| 31 | sub stringify | ||||||||||||||||||||
| 32 | { | ||||||||||||||||||||
| 33 | 0 | ▶ | my $self = shift; | ||||||||||||||||||
|
Subroutine
stringify: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 34 | 0 | return $self->{ 'ORG' }; | |||||||||||||||||||
| 35 | } | ||||||||||||||||||||
| 36 | |||||||||||||||||||||
| 37 | 1 | 1; | |||||||||||||||||||
| 38 | ###EOF######################################################################## | ||||||||||||||||||||
| 39 | |||||||||||||||||||||