Yarn/Types.pm

filter: Statementstmt 88.8% 16 / 18 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod n/a totaltotal 91.6% 22 / 24 CC 1 SCAR 0.5
CC
1
Cov
89%
BEGIN
1.3
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Yarn/Graphene.pm ↑ Summary
1 1 ▶use Modern::Perl;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 package Intertangle::Yarn::Types;
3 # ABSTRACT: Types for Yarn
4 $Intertangle::Yarn::Types::VERSION = '0.001';
5 1 use Type::Library 0.008 -base,
6 -declare => [qw(
7 Point
8 Vec2
9 Size
10 AngleDegrees
11 Rect
12 Matrix
13 1 ▶ )];
Subroutine BEGIN: called CC=1 SCAR=0.0
14 1 ▶use Type::Utils -all;
Subroutine BEGIN: called CC=1 SCAR=0.0
15 1 ▶use Types::Standard qw(Tuple Num);
Subroutine BEGIN: called CC=1 SCAR=0.0
16 1 ▶use Types::Common::Numeric qw(PositiveOrZeroNum);
Subroutine BEGIN: called CC=1 SCAR=0.0
17  
18 1 ▶use Intertangle::Yarn::Graphene;
Subroutine BEGIN: called CC=1 SCAR=2.6
19  
20 class_type "Point",
21 { class => 'Intertangle::Yarn::Graphene::Point' };
22  
23 coerce "Point",
24 from Tuple[Num, Num],
25 via {
26 Intertangle::Yarn::Graphene::Point->new(
27 x => $_->[0],
28 y => $_->[1],
29 )
30 };
31  
32 class_type "Vec2",
33 { class => 'Intertangle::Yarn::Graphene::Vec2' };
34  
35 coerce "Vec2",
36 from Tuple[Num, Num],
37 via {
38 Intertangle::Yarn::Graphene::Vec2->new(
39 x => $_->[0],
40 y => $_->[1],
41 )
42 };
43  
44 class_type "Size",
45 { class => 'Intertangle::Yarn::Graphene::Size' };
46  
47 coerce "Size",
48 from Tuple[PositiveOrZeroNum, PositiveOrZeroNum],
49 via {
50 Intertangle::Yarn::Graphene::Size->new(
51 width => $_->[0],
52 height => $_->[1],
53 )
54 };
55  
56 declare "AngleDegrees", parent => Num;
57  
58 class_type "Rect",
59 { class => 'Intertangle::Yarn::Graphene::Rect' };
60  
61 class_type "Matrix",
62 { class => 'Intertangle::Yarn::Graphene::Matrix' };
63  
64 1;
65  
66 __END__
« Yarn/Graphene.pm ↑ Summary