| 1 | package TaskPipe::Role::MooseType_OutputMode; | ||
| 2 | |||
| 3 | use Moose::Role; | ||
| 4 | use Moose::Util::TypeConstraints; | ||
| 5 | |||
| 6 | subtype 'OutputMode', | ||
| 7 | as 'Str', | ||
| 8 | where { | ||
| 9 | $_ eq 'file' | ||
| 10 | || $_ eq 'screen' | ||
| 11 | || $_ eq 'both' | ||
| 12 | }; | ||
| 13 | |||
| 14 | =head1 NAME | ||
| 15 | |||
| 16 | TaskPipe::Role::MooseType_OutputMode - output mode type constraint | ||
| 17 | |||
| 18 | =head1 DESCRIPTION | ||
| 19 | |||
| 20 | A moose subtype to be included as a role | ||
| 21 | |||
| 22 | =head1 AUTHOR | ||
| 23 | |||
| 24 | Tom Gracey <tomgracey@gmail.com> | ||
| 25 | |||
| 26 | =head1 COPYRIGHT AND LICENSE | ||
| 27 | |||
| 28 | Copyright (c) Tom Gracey 2018 | ||
| 29 | |||
| 30 | TaskPipe is free software, licensed under | ||
| 31 | |||
| 32 | The GNU Public License Version 3 | ||
| 33 | |||
| 34 | =cut | ||
| 35 | |||
| 36 | 1; |