10 with 'MooseX::Getopt';
12 has foo => ( isa => 'Int', is => 'ro', documentation => 'A foo' );
13 has help => ( isa => 'Bool', is => 'ro', default => 0, documentation => 'Help');
16 before _getopt_full_usage => sub { $usage++; };
19 local @ARGV = ('--foo', '1');
20 my $i = MyScript->new_with_options;
23 is $MyScript::usage, 0;
26 local @ARGV = ('--help');
27 throws_ok { MyScript->new_with_options } qr/A foo/;
28 is $MyScript::usage, 1;