4 use Test::More tests => 5;
10 use Moose::Util::TypeConstraints;
16 => as 'DBIx::Class::ResultSet';
19 => as 'ArrayRef[Int]';
21 MooseX::Getopt::OptionTypeMap->add_option_type_to_map(
28 return [ grep { m/^\d+$/ } split /\D/,$_ ]; # <- split string into arrayref
33 isa => 'ResultList | ResultSet', # <- union constraint
43 # Without MooseX::Getopt
45 my $example = example->new({
46 results => '1234,5678,9012',
49 isa_ok($example, 'example');
50 is_deeply($example->results, [qw(1234 5678 9012)], 'result as expected');
55 local @ARGV = ('--results','1234,5678,9012','--other','test');
56 my $example = example->new_with_options;
57 isa_ok($example, 'example');
59 is($example->other,'test');
60 is_deeply($example->results, [qw(1234 5678 9012)], 'result as expected');