File Coverage

blib/lib/Stepford/Types/Internal.pm
Criterion Covered Total %
statement 24 24 100.0
branch n/a
condition n/a
subroutine 8 8 100.0
pod n/a
total 32 32 100.0


line stmt bran cond sub pod time code
1             package Stepford::Types::Internal;
2              
3 43     43   25449 use strict;
  43         132  
  43         1370  
4 43     43   259 use warnings;
  43         110  
  43         2129  
5              
6             our $VERSION = '0.006001';
7              
8 43     43   21619 use MooseX::Types::Common::String qw( NonEmptyStr );
  43         4356849  
  43         317  
9 43     43   136340 use MooseX::Types::Moose qw( ArrayRef Str );
  43         123  
  43         353  
10 43     43   220228 use Moose::Util::TypeConstraints qw( enum );
  43         153  
  43         540  
11              
12 43         360 use MooseX::Types -declare => [ qw(
13             ArrayOfClassPrefixes
14             ArrayOfDependencies
15             ArrayOfSteps
16             Logger
17             PossibleClassName
18             Step
19 43     43   21509 ) ];
  43         129  
20              
21 43     43   314218 use namespace::clean;
  43         122  
  43         341  
22              
23             subtype PossibleClassName, as Str, inline_as {
24             ## no critic (Subroutines::ProtectPrivateSubs)
25             $_[0]->parent->_inline_check( $_[1] ) . ' && '
26             . $_[1]
27             . ' =~ /^\\p{L}\\w*(?:::\\w+)*$/';
28             };
29              
30             subtype ArrayOfClassPrefixes, as ArrayRef [PossibleClassName], inline_as {
31             ## no critic (Subroutines::ProtectPrivateSubs)
32             $_[0]->parent->_inline_check( $_[1] ) . " && \@{ $_[1] } >= 1";
33             };
34              
35             coerce ArrayOfClassPrefixes, from PossibleClassName, via { [$_] };
36              
37             subtype ArrayOfDependencies, as ArrayRef [NonEmptyStr];
38              
39             coerce ArrayOfDependencies, from NonEmptyStr, via { [$_] };
40              
41             duck_type Logger, [qw( debug info notice warning error )];
42              
43             role_type Step, { role => 'Stepford::Role::Step' };
44              
45             subtype ArrayOfSteps, as ArrayRef [Step];
46              
47             coerce ArrayOfSteps, from Step, via { [$_] };
48              
49 43     43   40602 no Moose::Util::TypeConstraints;
  43         125  
  43         555  
50              
51             1;
52              
53             # ABSTRACT: Internal type definitions for Stepford
54              
55             __END__
56              
57             =pod
58              
59             =encoding UTF-8
60              
61             =head1 NAME
62              
63             Stepford::Types::Internal - Internal type definitions for Stepford
64              
65             =head1 VERSION
66              
67             version 0.006001
68              
69             =head1 SUPPORT
70              
71             Bugs may be submitted through L<https://github.com/maxmind/Stepford/issues>.
72              
73             =head1 AUTHOR
74              
75             Dave Rolsky <drolsky@maxmind.com>
76              
77             =head1 COPYRIGHT AND LICENSE
78              
79             This software is copyright (c) 2014 - 2023 by MaxMind, Inc.
80              
81             This is free software; you can redistribute it and/or modify it under
82             the same terms as the Perl 5 programming language system itself.
83              
84             =cut