Interchange6/Types.pm

filter: Statementstmt 95.8% 23 / 24 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 87.5% 7 / 8 Podpod n/a totaltotal 93.7% 30 / 32 CC 1 SCAR 0.2
CC
1
Cov
96%
__ANON__
1.1
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Interchange6/Cart/Cost.pm ↑ Summary Interchange6.pm »
1 package Interchange6::Types;
2  
3 5 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 5 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 5 ▶use Type::Library -base, -declare => qw( Cart CartCost CartProduct );
Subroutine BEGIN: called CC=1 SCAR=0.0
7 5 ▶use Type::Utils -all;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 5 ▶use Types::Standard -types;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 BEGIN {
11 5 ▶ extends "Types::Standard", "Types::Common::Numeric",
Subroutine BEGIN: called CC=1 SCAR=0.0
12 "Types::Common::String";
13 }
14  
15 5 class_type Cart, { class => 'Interchange6::Cart' };
16  
17 5 class_type CartCost, { class => 'Interchange6::Cart::Cost' };
18 12 ▶coerce CartCost, from Any, via { 'Interchange6::Cart::Cost'->new(@_) };
Subroutine __ANON__: called CC=1 SCAR=0.0
19  
20 5 class_type CartProduct, { class => 'Interchange6::Cart::Product' };
21 0 ▶coerce CartProduct, from Any, via { 'Interchange6::Cart::Product'->new(@_) };
Subroutine __ANON__: not called CC=1 SCAR=1.2
22  
23 5 1;
24 __END__
« Interchange6/Cart/Cost.pm ↑ Summary Interchange6.pm »