Commit | Line | Data |
---|---|---|
ca9d7442 | 1 | package TestLibrary2; |
2 | ||
3 | use MooseX::Types | |
4 | -declare => [qw( MTFNPY NonEmptyStr )]; | |
5 | use MooseX::Types::Moose 'Str'; | |
6 | ||
7 | subtype MTFNPY, | |
8 | as Str, | |
9 | where { length $_ }, | |
10 | message { 'MTFNPY must not be empty' }; | |
11 | ||
12 | subtype NonEmptyStr, | |
13 | as Str, | |
14 | where { length $_ }, | |
15 | message { 'Str must not be empty' }; | |
16 | ||
17 | 1; |