blib/lib/Mason/Types.pm untested

filter: Statementstmt 0.0% 0 / 26 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 3 Podpod n/a totaltotal 0.0% 0 / 31 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 package Mason::Types;
2 $Mason::Types::VERSION = '2.23';
3 use Moose::Util::TypeConstraints;
4 use strict;
5 use warnings;
6  
7 subtype 'Mason::Types::CompRoot' => as 'ArrayRef[Str]';
8 coerce 'Mason::Types::CompRoot' => from 'Str' => via { [$_] };
9  
10 subtype 'Mason::Types::OutMethod' => as 'CodeRef';
11 coerce 'Mason::Types::OutMethod' => from 'ScalarRef' => via {
12 my $ref = $_;
13 sub { $$ref .= $_[0] }
14 };
15  
16 subtype 'Mason::Types::RegexpRefOrStr' => as 'RegexpRef';
17 coerce 'Mason::Types::RegexpRefOrStr' => from 'Str' => via { qr/$/ };
18  
19 subtype 'Mason::Types::Autoextend' => as 'ArrayRef[Str]';
20 coerce 'Mason::Types::Autoextend' => from 'Bool' => via { $_ ? [ '.mp', '.mc' ] : [] };
21  
22 1;