File Coverage

blib/lib/Proc/tored/Types.pm
Criterion Covered Total %
statement 15 15 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod n/a
total 20 20 100.0


line stmt bran cond sub pod time code
1             package Proc::tored::Types;
2             # ABSTRACT: Type constraints used by Proc::tored
3             $Proc::tored::Types::VERSION = '0.20';
4 3     3   193249 use strict;
  3         16  
  3         112  
5 3     3   20 use warnings;
  3         6  
  3         119  
6 3     3   361 use Types::Standard -types;
  3         68602  
  3         31  
7 3     3   16944 use Type::Utils -all;
  3         4165  
  3         27  
8 3         24 use Type::Library -base,
9               -declare => qw(
10             NonEmptyStr
11             Dir
12             SignalList
13 3     3   10816 );
  3         7  
14              
15              
16             declare NonEmptyStr, as Str, where { $_ =~ /\S/sm };
17             declare Dir, as NonEmptyStr, where { -d $_ && -w $_ };
18             declare SignalList, as ArrayRef[Str], where { @$_ == 0 || $^O ne 'MSWin32' };
19              
20             1;
21              
22             __END__
23            
24             =pod
25            
26             =encoding UTF-8
27            
28             =head1 NAME
29            
30             Proc::tored::Types - Type constraints used by Proc::tored
31            
32             =head1 VERSION
33            
34             version 0.20
35            
36             =head1 TYPES
37            
38             =head2 NonEmptyStr
39            
40             A C<Str> that contains at least one non-whitespace character.
41            
42             =head2 Dir
43            
44             A L</NonEmptyStr> that is a valid, writable directory path.
45            
46             =head2 SignalList
47            
48             An array ref of strings suitable for use in C<%SIG>, except on MSWin32 systems.
49            
50             =head1 AUTHOR
51            
52             Jeff Ober <sysread@fastmail.fm>
53            
54             =head1 COPYRIGHT AND LICENSE
55            
56             This software is copyright (c) 2017 by Jeff Ober.
57            
58             This is free software; you can redistribute it and/or modify it under
59             the same terms as the Perl 5 programming language system itself.
60            
61             =cut
62