App/Types.pm untested

filter: Statementstmt 0.0% 0 / 14 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 23 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 package Gapp::App::Types;
2 {
3 $Gapp::App::Types::VERSION = '0.007';
4 }
5  
6 use MooseX::Types -declare => [qw(
7 GappAppHookAction
8 )];
9  
10 use MooseX::Types::Moose qw( Str );
11  
12 subtype GappAppHookAction
13 => as Str
14 => where { $_ eq 'aggregate' || $_ eq 'halt' }
15 => message { "hook action must be 'aggregate' or 'halt'" };
16  
17 # accept aggr* for 'aggregate'
18 coerce GappAppHookAction
19 => from Str
20 => via { /^aggr/ ? 'aggregate' : undef };
21  
22  
23 1;