blib/lib/Salvation/TC/Meta.pm

filter: Statementstmt 100% 12 / 12 Branchbran 50.0% 1 / 2 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 4 / 4 Podpod 100% 2 / 2 totaltotal 80.0% 20 / 25 SCAR 11.1
CC
3
Cov
82%
new
3.5
BEGIN
1.0
BEGIN
1.0
CRAP 3.0
« blib/lib/Salvation/TC/Exception/WrongType.pm ↑ Summary blib/lib/Salvation/TC/Type/Str.pm »
1 package Salvation::TC::Meta;
2  
3 =head1 NAME
4  
5 Salvation::TC::Meta - Базовый класс для классов внутри Salvation::TC
6  
7 =cut
8  
9 4 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 4 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 =head1 METHODS
13  
14 =cut
15  
16 =head2 new()
17  
18 =cut
19  
20 sub new {
21  
22 178 ▶ my ( $proto, %args ) = @_;
Subroutine new: called CC=3 SCAR=12.5
Pod documented
23  
24 178 ▶ die( 'Metaclass must have a name' ) unless( defined $args{ 'name' } );
Branch: 1 branch
BranchTrueFalseTotal
unless defined $args{"name"} 0 178 178
25  
26 178 ▶ return bless( \%args, ( ref( $proto ) || $proto ) );
Condition33%1/3
ref $proto || $proto
l!l&&r!l&&!r
01780
MC/DC0%0/2
ref $proto || $proto
ref $proto $proto
Truth table33%1/3
A || B
A= ref $protoB= $proto
ABresult
1X1
011
000
27 }
28  
29 =head2 name()
30  
31 =cut
32  
33 sub name {
34  
35 238 ▶ my ( $self ) = @_;
Subroutine name: called CC=1 SCAR=0.0
Pod documented
36  
37 238 return $self -> { 'name' };
38 }
39  
40 4 1;
41  
42 __END__
« blib/lib/Salvation/TC/Exception/WrongType.pm ↑ Summary blib/lib/Salvation/TC/Type/Str.pm »