| File: | lib/Code/Statistics/MooseTypes.pm |
| Coverage: | 100.0% |
| line | stmt | bran | cond | sub | pod | time | code |
|---|---|---|---|---|---|---|---|
| 1 | 1 1 1 | 0 0 0 | use strict; | ||||
| 2 | 1 1 1 | 0 0 0 | use warnings; | ||||
| 3 | |||||||
| 4 | package Code::Statistics::MooseTypes; | ||||||
| 5 | |||||||
| 6 | # ABSTRACT: provides coercion types for Code::Statistics | ||||||
| 7 | |||||||
| 8 | 1 1 1 | 0 0 0 | use Moose::Util::TypeConstraints; | ||||
| 9 | |||||||
| 10 | subtype 'CS::InputList' => as 'ArrayRef'; | ||||||
| 11 | coerce 'CS::InputList' => from 'Str' => via { | ||||||
| 12 | my @list = split /;/, $_; | ||||||
| 13 | return \@list; | ||||||
| 14 | }; | ||||||
| 15 | |||||||
| 16 | 1; | ||||||