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.19';
4 3     3   121589 use strict;
  3         5  
  3         70  
5 3     3   12 use warnings;
  3         5  
  3         73  
6 3     3   345 use Types::Standard -types;
  3         67917  
  3         19  
7 3     3   11109 use Type::Utils -all;
  3         3377  
  3         18  
8 3         15 use Type::Library -base,
9               -declare => qw(
10             NonEmptyStr
11             Dir
12             SignalList
13 3     3   7938 );
  3         5  
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.19
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