PivotalTracker/Types.pm

filter: Statementstmt 97.6% 42 / 43 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 91.6% 11 / 12 Podpod n/a totaltotal 96.3% 53 / 55 CC 1 SCAR 0.8
CC
1
Cov
98%
__ANON__
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.1
« PivotalTracker/Entity.pm ↑ Summary
1 package WebService::PivotalTracker::Types;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 1 our $VERSION = '0.12';
7  
8 use Type::Library
9 1 ▶ -base,
Subroutine BEGIN: called CC=1 SCAR=0.0
10 -declare => qw(
11 ClientObject
12 CommentObject
13 DateTimeObject
14 DayOfWeek
15 IterationScope
16 LabelObject
17 LWPObject
18 MD5Hex
19 PersonObject
20 ProjectType
21 PTAPIObject
22 StoryState
23 StoryType
24 1 );
25 1 ▶use Type::Utils -all;
Subroutine BEGIN: called CC=1 SCAR=0.0
26 1 ▶use Types::Common::Numeric;
Subroutine BEGIN: called CC=1 SCAR=0.0
27 1 ▶use Types::Common::String;
Subroutine BEGIN: called CC=1 SCAR=0.0
28 1 ▶use Types::Standard -types;
Subroutine BEGIN: called CC=1 SCAR=0.0
29 1 ▶use Types::URI;
Subroutine BEGIN: called CC=1 SCAR=0.0
30  
31 1 ▶BEGIN {
Subroutine BEGIN: called CC=1 SCAR=0.0
32 1 extends qw(
33 Types::Common::Numeric
34 Types::Common::String
35 Types::Standard
36 Types::URI
37 );
38 }
39  
40 1 class_type ClientObject, { class => 'WebService::PivotalTracker::Client' };
41  
42 1 class_type CommentObject, { class => 'WebService::PivotalTracker::Comment' };
43  
44 1 class_type DateTimeObject, { class => 'DateTime' };
45  
46 1 enum DayOfWeek, [
47 qw(
48 monday
49 tuesday
50 wednesday
51 thursday
52 friday
53 saturday
54 sunday
55 )
56 ];
57  
58 1 enum IterationScope, [
59 qw(
60 done
61 current
62 backlog
63 current_backlog
64 done_current
65 )
66 ];
67  
68 1 class_type LabelObject, { class => 'WebService::PivotalTracker::Label' };
69  
70 1 class_type LWPObject, { class => 'LWP::UserAgent' };
71  
72 declare MD5Hex,
73 as Defined,
74 0 ▶ where {m/^[0-9a-f]{32}$/i},
Subroutine __ANON__: not called CC=1 SCAR=6.9
75 5 ▶ inline_as {
Subroutine __ANON__: called CC=1 SCAR=0.0
76 5 $_[0]->parent->inline_check( $_[1] ) . " && $_[1] =~ m/^[0-9a-f]{32}\$/i"
77 }
78 3 ▶message {'token does not stringify to an MD5 string'};
Subroutine __ANON__: called CC=1 SCAR=0.0
79  
80 1 class_type PersonObject, { class => 'WebService::PivotalTracker::Person' };
81  
82 1 enum ProjectType, [
83 qw(
84 demo
85 private
86 public
87 shared
88 )
89 ];
90  
91 1 class_type PTAPIObject, { class => 'WebService::PivotalTracker' };
92  
93 1 enum StoryState, [
94 qw(
95 accepted
96 delivered
97 finished
98 started
99 rejected
100 planned
101 unstarted
102 unscheduled
103 )
104 ];
105  
106 1 enum StoryType, [qw( feature bug chore release )];
107  
108 1 1;
109  
110 # ABSTRACT: Type definitions used in this distro
111  
112 __END__
« PivotalTracker/Entity.pm ↑ Summary