Sink/Class.pm

filter: Statementstmt 58.8% 10 / 17 Branchbran n/a Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 60.0% 3 / 5 Podpod 0.0% 0 / 2 totaltotal 44.8% 13 / 29 CC 2 SCAR 10.4
CC
2
Cov
50%
new
6.0
stringify
2.0
BEGIN
1.0
CRAP 2.8
« Sink.pm ↑ Summary
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
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $class || $class
ref $class $class
Truth table0%0/3
A || B
A= ref $classB= $class
ABresult
1X1
011
000
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  
« Sink.pm ↑ Summary