| 1 | package TaskPipe::Role::MooseType_StrArrayRef; | ||
| 2 | |||
| 3 | 1 | ▶ | use Moose::Role; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 1 | ▶ | use Moose::Util::TypeConstraints; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | |||
| 7 | 1 | subtype 'StrArrayRef', as 'ArrayRef'; | |
| 8 | |||
| 9 | coerce 'StrArrayRef', from 'Str', via { | ||
| 10 | 0 | ▶ | my @vals = split(',',$_); |
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
| |||
| 11 | 0 | for my $i (0..$#vals){ | |
| 12 | 0 | $vals[$i] =~ s/^\s+//; | |
| 13 | 0 | $vals[$i] =~ s/\s+//; | |
| 14 | } | ||
| 15 | 0 | return \@vals; | |
| 16 | 1 | }; | |
| 17 | |||
| 18 | |||
| 19 | =head1 NAME | ||
| 20 | |||
| 21 | TaskPipe::Role::MooseType_StrArrayRef - array ref represented as a string type constraint | ||
| 22 | |||
| 23 | =head1 DESCRIPTION | ||
| 24 | |||
| 25 | A moose subtype to be included as a role | ||
| 26 | |||
| 27 | =head1 AUTHOR | ||
| 28 | |||
| 29 | Tom Gracey <tomgracey@gmail.com> | ||
| 30 | |||
| 31 | =head1 COPYRIGHT AND LICENSE | ||
| 32 | |||
| 33 | Copyright (c) Tom Gracey 2018 | ||
| 34 | |||
| 35 | TaskPipe is free software, licensed under | ||
| 36 | |||
| 37 | The GNU Public License Version 3 | ||
| 38 | |||
| 39 | =cut | ||
| 40 | |||
| 41 | 1 | 1; | |