File Coverage

blib/lib/Proc/tored/Pool/Types.pm
Criterion Covered Total %
statement 18 18 100.0
branch n/a
condition n/a
subroutine 6 6 100.0
pod n/a
total 24 24 100.0


line stmt bran cond sub pod time code
1             package Proc::tored::Pool::Types;
2             # ABSTRACT: Type constraints used by Proc::tored::Pool
3             $Proc::tored::Pool::Types::VERSION = '0.05';
4 29     29   87 use strict;
  29         29  
  29         593  
5 29     29   87 use warnings;
  29         29  
  29         603  
6 29     29   87 use Proc::tored::Pool::Constants ':events';
  29         29  
  29         2318  
7 29     29   129 use Types::Standard -types;
  29         29  
  29         390  
8 29     29   78588 use Type::Utils -all;
  29         58  
  29         229  
9 29         158 use Type::Library -base,
10             -declare => qw(
11             NonEmptyStr
12             Dir
13             Task
14             PosInt
15             Event
16 29     29   52842 );
  29         29  
17              
18              
19             declare NonEmptyStr, as Str, where { $_ =~ /\S/ };
20             declare Dir, as NonEmptyStr, where { -d $_ };
21             declare PosInt, as Int, where { $_ > 0 };
22             declare Event, as Enum[assignment, success, failure];
23              
24             1;
25              
26             __END__