6 use Test::More tests => 9;
10 use_ok('MooseX::Getopt');
17 with 'MooseX::Getopt';
20 metaclass => 'Getopt',
23 default => 'file.dat',
28 metaclass => 'Getopt',
32 cmd_aliases => [qw/ moocow m c /],
36 metaclass => 'Getopt',
58 default => sub { [] },
64 default => sub { {} },
67 has 'private_stuff' => (
68 metaclass => 'NoGetopt',
74 has '_private_stuff_cmdline' => (
75 metaclass => 'Getopt',
87 my $app = App->new_with_options;
88 isa_ok( $app, 'App' );
90 ok( !$app->verbose, '... verbosity is off as expected' );
91 is( $app->length, 24, '... length is 24 as expected' );
92 is( $app->data, 'file.dat', '... data is file.dat as expected' );
93 is_deeply( $app->libs, [], '... libs is [] as expected' );
94 is_deeply( $app->details, {}, '... details is {} as expected' );
95 is($app->private_stuff, 713, '... private stuff is 713 as expected');
99 local @ARGV = (qw/--private_stuff 317/);
101 throws_ok { App->new_with_options } qr/Unknown option: private_stuff/;