From: Florian Ragwitz Date: Sat, 5 Jun 2010 20:08:51 +0000 (+0200) Subject: Remove some more trailing whitespace X-Git-Tag: 0.28~3 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2557b52647dda5b9e090b324d950d4a55db74bae;p=gitmo%2FMooseX-Getopt.git Remove some more trailing whitespace --- diff --git a/lib/MooseX/Getopt.pm b/lib/MooseX/Getopt.pm index cc2e19a..49b47b9 100644 --- a/lib/MooseX/Getopt.pm +++ b/lib/MooseX/Getopt.pm @@ -195,7 +195,7 @@ If L fails (due to invalid arguments), C will throw an exception. If L is installed and any of the following -command line params are passed, the program will exit with usage +command line params are passed, the program will exit with usage information. You can add descriptions for each option by including a B option for each attribute to document. diff --git a/lib/MooseX/Getopt/Basic.pm b/lib/MooseX/Getopt/Basic.pm index 7d5d696..0a5eff5 100644 --- a/lib/MooseX/Getopt/Basic.pm +++ b/lib/MooseX/Getopt/Basic.pm @@ -206,9 +206,9 @@ sub _attrs_to_options { opt_string => $opt_string, required => $attr->is_required && !$attr->has_default && !$attr->has_builder && !exists $config_from_file->{$attr->name}, # NOTE: - # this "feature" was breaking because - # Getopt::Long::Descriptive would return - # the default value as if it was a command + # this "feature" was breaking because + # Getopt::Long::Descriptive would return + # the default value as if it was a command # line flag, which would then override the # one passed into a constructor. # See 100_gld_default_bug.t for an example diff --git a/lib/MooseX/Getopt/GLD.pm b/lib/MooseX/Getopt/GLD.pm index 2cfbd7d..b2ccafe 100644 --- a/lib/MooseX/Getopt/GLD.pm +++ b/lib/MooseX/Getopt/GLD.pm @@ -32,9 +32,9 @@ sub _gld_spec { { ( ( $opt->{required} && !exists($constructor_params->{$opt->{init_arg}}) ) ? (required => $opt->{required}) : () ), # NOTE: - # remove this 'feature' because it didn't work + # remove this 'feature' because it didn't work # all the time, and so is better to not bother - # since Moose will handle the defaults just + # since Moose will handle the defaults just # fine anyway. # - SL #( exists $opt->{default} ? (default => $opt->{default}) : () ), diff --git a/t/001_basic.t b/t/001_basic.t index 6c1c1fa..b7bea2d 100644 --- a/t/001_basic.t +++ b/t/001_basic.t @@ -12,11 +12,11 @@ BEGIN { { package App; use Moose; - + with 'MooseX::Getopt'; has 'data' => ( - metaclass => 'MooseX::Getopt::Meta::Attribute', + metaclass => 'MooseX::Getopt::Meta::Attribute', is => 'ro', isa => 'Str', default => 'file.dat', @@ -24,7 +24,7 @@ BEGIN { ); has 'cow' => ( - metaclass => 'Getopt', + metaclass => 'Getopt', is => 'ro', isa => 'Str', default => 'moo', @@ -32,7 +32,7 @@ BEGIN { ); has 'horse' => ( - metaclass => 'MooseX::Getopt::Meta::Attribute', + metaclass => 'MooseX::Getopt::Meta::Attribute', is => 'ro', isa => 'Str', default => 'bray', @@ -48,15 +48,15 @@ BEGIN { has 'verbose' => ( is => 'ro', - isa => 'Bool', + isa => 'Bool', ); - + has 'libs' => ( is => 'ro', isa => 'ArrayRef', default => sub { [] }, - ); - + ); + has 'details' => ( is => 'ro', isa => 'HashRef', @@ -70,13 +70,13 @@ BEGIN { ); has '_private_stuff_cmdline' => ( - metaclass => 'MooseX::Getopt::Meta::Attribute', + metaclass => 'MooseX::Getopt::Meta::Attribute', is => 'ro', isa => 'Int', default => 832, cmd_flag => 'p', ); - + } foreach my $attr_name (qw(data cow horse _private_stuff_cmdline)) { @@ -84,7 +84,7 @@ foreach my $attr_name (qw(data cow horse _private_stuff_cmdline)) { isa_ok($attr, 'Moose::Meta::Attribute'); isa_ok($attr, 'MooseX::Getopt::Meta::Attribute'); can_ok($attr, 'cmd_flag'); - can_ok($attr, 'cmd_aliases'); + can_ok($attr, 'cmd_aliases'); } { @@ -94,10 +94,10 @@ foreach my $attr_name (qw(data cow horse _private_stuff_cmdline)) { isa_ok($app, 'App'); ok(!$app->verbose, '... verbosity is off as expected'); - is($app->length, 24, '... length is 24 as expected'); - is($app->data, 'file.dat', '... data is file.dat as expected'); - is_deeply($app->libs, [], '... libs is [] as expected'); - is_deeply($app->details, {}, '... details is {} as expected'); + is($app->length, 24, '... length is 24 as expected'); + is($app->data, 'file.dat', '... data is file.dat as expected'); + is_deeply($app->libs, [], '... libs is [] as expected'); + is_deeply($app->details, {}, '... details is {} as expected'); } { @@ -107,10 +107,10 @@ foreach my $attr_name (qw(data cow horse _private_stuff_cmdline)) { isa_ok($app, 'App'); ok($app->verbose, '... verbosity is turned on as expected'); - is($app->length, 50, '... length is 50 as expected'); - is($app->data, 'file.dat', '... data is file.dat as expected'); - is_deeply($app->libs, [], '... libs is [] as expected'); - is_deeply($app->details, {}, '... details is {} as expected'); + is($app->length, 50, '... length is 50 as expected'); + is($app->data, 'file.dat', '... data is file.dat as expected'); + is_deeply($app->libs, [], '... libs is [] as expected'); + is_deeply($app->details, {}, '... details is {} as expected'); } { @@ -120,10 +120,10 @@ foreach my $attr_name (qw(data cow horse _private_stuff_cmdline)) { isa_ok($app, 'App'); ok($app->verbose, '... verbosity is turned on as expected'); - is($app->length, 24, '... length is 24 as expected'); - is($app->data, 'foo.txt', '... data is foo.txt as expected'); - is_deeply($app->libs, [], '... libs is [] as expected'); - is_deeply($app->details, {}, '... details is {} as expected'); + is($app->length, 24, '... length is 24 as expected'); + is($app->data, 'foo.txt', '... data is foo.txt as expected'); + is_deeply($app->libs, [], '... libs is [] as expected'); + is_deeply($app->details, {}, '... details is {} as expected'); } { @@ -133,12 +133,12 @@ foreach my $attr_name (qw(data cow horse _private_stuff_cmdline)) { isa_ok($app, 'App'); ok($app->verbose, '... verbosity is turned on as expected'); - is($app->length, 24, '... length is 24 as expected'); - is($app->data, 'file.dat', '... data is foo.txt as expected'); - is_deeply($app->libs, - ['libs/', 'includes/lib'], - '... libs is [libs/, includes/lib] as expected'); - is_deeply($app->details, {}, '... details is {} as expected'); + is($app->length, 24, '... length is 24 as expected'); + is($app->data, 'file.dat', '... data is foo.txt as expected'); + is_deeply($app->libs, + ['libs/', 'includes/lib'], + '... libs is [libs/, includes/lib] as expected'); + is_deeply($app->details, {}, '... details is {} as expected'); } { @@ -148,12 +148,12 @@ foreach my $attr_name (qw(data cow horse _private_stuff_cmdline)) { isa_ok($app, 'App'); ok(!$app->verbose, '... verbosity is turned on as expected'); - is($app->length, 24, '... length is 24 as expected'); - is($app->data, 'file.dat', '... data is foo.txt as expected'); - is_deeply($app->libs, [], '... libs is [] as expected'); - is_deeply($app->details, - { os => 'mac', name => 'foo' }, - '... details is { os => mac, name => foo } as expected'); + is($app->length, 24, '... length is 24 as expected'); + is($app->data, 'file.dat', '... data is foo.txt as expected'); + is_deeply($app->libs, [], '... libs is [] as expected'); + is_deeply($app->details, + { os => 'mac', name => 'foo' }, + '... details is { os => mac, name => foo } as expected'); } { @@ -164,10 +164,10 @@ foreach my $attr_name (qw(data cow horse _private_stuff_cmdline)) { isa_ok($app, 'App'); ok(!$app->verbose, '... verbosity is turned off as expected'); - is($app->length, 24, '... length is 24 as expected'); - is($app->data, 'file.dat', '... file is file.dat as expected'); - is_deeply($app->libs, [], '... libs is [] as expected'); - is_deeply($app->details, {}, '... details is {} as expected'); + is($app->length, 24, '... length is 24 as expected'); + is($app->data, 'file.dat', '... file is file.dat as expected'); + is_deeply($app->libs, [], '... libs is [] as expected'); + is_deeply($app->details, {}, '... details is {} as expected'); } # Test cmd_alias without cmd_flag diff --git a/t/002_custom_option_type.t b/t/002_custom_option_type.t index fc46250..890477d 100644 --- a/t/002_custom_option_type.t +++ b/t/002_custom_option_type.t @@ -13,25 +13,25 @@ BEGIN { package App; use Moose; use Moose::Util::TypeConstraints; - + use Scalar::Util 'looks_like_number'; - + with 'MooseX::Getopt'; subtype 'ArrayOfInts' => as 'ArrayRef' => where { scalar (grep { looks_like_number($_) } @$_) }; - + MooseX::Getopt::OptionTypeMap->add_option_type_to_map( 'ArrayOfInts' => '=i@' ); - + has 'nums' => ( is => 'ro', isa => 'ArrayOfInts', default => sub { [0] } - ); - + ); + } { @@ -39,8 +39,8 @@ BEGIN { my $app = App->new_with_options; isa_ok($app, 'App'); - - is_deeply($app->nums, [0], '... nums is [0] as expected'); + + is_deeply($app->nums, [0], '... nums is [0] as expected'); } { @@ -48,8 +48,8 @@ BEGIN { my $app = App->new_with_options; isa_ok($app, 'App'); - - is_deeply($app->nums, [3, 5], '... nums is [3, 5] as expected'); + + is_deeply($app->nums, [3, 5], '... nums is [3, 5] as expected'); } # Make sure it really used our =i@, instead of falling back diff --git a/t/003_inferred_option_type.t b/t/003_inferred_option_type.t index 5624867..e5ceae9 100644 --- a/t/003_inferred_option_type.t +++ b/t/003_inferred_option_type.t @@ -13,21 +13,21 @@ BEGIN { package App; use Moose; use Moose::Util::TypeConstraints; - + use Scalar::Util 'looks_like_number'; - + with 'MooseX::Getopt'; subtype 'ArrayOfInts' => as 'ArrayRef' => where { scalar (grep { looks_like_number($_) } @$_) }; - + has 'nums' => ( is => 'ro', isa => 'ArrayOfInts', default => sub { [0] } - ); - + ); + } { @@ -35,8 +35,8 @@ BEGIN { my $app = App->new_with_options; isa_ok($app, 'App'); - - is_deeply($app->nums, [0], '... nums is [0] as expected'); + + is_deeply($app->nums, [0], '... nums is [0] as expected'); } { @@ -44,7 +44,7 @@ BEGIN { my $app = App->new_with_options; isa_ok($app, 'App'); - - is_deeply($app->nums, [3, 5], '... nums is [3, 5] as expected'); + + is_deeply($app->nums, [3, 5], '... nums is [3, 5] as expected'); } diff --git a/t/006_metaclass_traits.t b/t/006_metaclass_traits.t index 18c3011..7e2a01c 100644 --- a/t/006_metaclass_traits.t +++ b/t/006_metaclass_traits.t @@ -13,11 +13,11 @@ BEGIN { { package App; use Moose; - + with 'MooseX::Getopt'; has 'data' => ( - traits => [ 'MooseX::Getopt::Meta::Attribute::Trait' ], + traits => [ 'MooseX::Getopt::Meta::Attribute::Trait' ], is => 'ro', isa => 'Str', default => 'file.dat', @@ -25,7 +25,7 @@ BEGIN { ); has 'cow' => ( - traits => [ 'Getopt' ], + traits => [ 'Getopt' ], is => 'ro', isa => 'Str', default => 'moo', @@ -33,7 +33,7 @@ BEGIN { ); has 'horse' => ( - traits => [ 'Getopt' ], + traits => [ 'Getopt' ], is => 'ro', isa => 'Str', default => 'bray', @@ -49,15 +49,15 @@ BEGIN { has 'verbose' => ( is => 'ro', - isa => 'Bool', + isa => 'Bool', ); - + has 'libs' => ( is => 'ro', isa => 'ArrayRef', default => sub { [] }, - ); - + ); + has 'details' => ( is => 'ro', isa => 'HashRef', @@ -71,22 +71,22 @@ BEGIN { ); has '_private_stuff_cmdline' => ( - traits => [ 'Getopt' ], + traits => [ 'Getopt' ], is => 'ro', isa => 'Int', default => 832, cmd_flag => 'p', ); - + } foreach my $attr_name (qw(data cow horse _private_stuff_cmdline)) { my $attr = App->meta->get_attribute($attr_name); isa_ok($attr, 'Moose::Meta::Attribute'); does_ok($attr, 'MooseX::Getopt::Meta::Attribute::Trait'); - + can_ok($attr, 'cmd_flag'); - can_ok($attr, 'cmd_aliases'); + can_ok($attr, 'cmd_aliases'); } { @@ -96,10 +96,10 @@ foreach my $attr_name (qw(data cow horse _private_stuff_cmdline)) { isa_ok($app, 'App'); ok(!$app->verbose, '... verbosity is off as expected'); - is($app->length, 24, '... length is 24 as expected'); - is($app->data, 'file.dat', '... data is file.dat as expected'); - is_deeply($app->libs, [], '... libs is [] as expected'); - is_deeply($app->details, {}, '... details is {} as expected'); + is($app->length, 24, '... length is 24 as expected'); + is($app->data, 'file.dat', '... data is file.dat as expected'); + is_deeply($app->libs, [], '... libs is [] as expected'); + is_deeply($app->details, {}, '... details is {} as expected'); } { @@ -109,10 +109,10 @@ foreach my $attr_name (qw(data cow horse _private_stuff_cmdline)) { isa_ok($app, 'App'); ok($app->verbose, '... verbosity is turned on as expected'); - is($app->length, 50, '... length is 50 as expected'); - is($app->data, 'file.dat', '... data is file.dat as expected'); - is_deeply($app->libs, [], '... libs is [] as expected'); - is_deeply($app->details, {}, '... details is {} as expected'); + is($app->length, 50, '... length is 50 as expected'); + is($app->data, 'file.dat', '... data is file.dat as expected'); + is_deeply($app->libs, [], '... libs is [] as expected'); + is_deeply($app->details, {}, '... details is {} as expected'); } { @@ -122,10 +122,10 @@ foreach my $attr_name (qw(data cow horse _private_stuff_cmdline)) { isa_ok($app, 'App'); ok($app->verbose, '... verbosity is turned on as expected'); - is($app->length, 24, '... length is 24 as expected'); - is($app->data, 'foo.txt', '... data is foo.txt as expected'); - is_deeply($app->libs, [], '... libs is [] as expected'); - is_deeply($app->details, {}, '... details is {} as expected'); + is($app->length, 24, '... length is 24 as expected'); + is($app->data, 'foo.txt', '... data is foo.txt as expected'); + is_deeply($app->libs, [], '... libs is [] as expected'); + is_deeply($app->details, {}, '... details is {} as expected'); } { @@ -135,12 +135,12 @@ foreach my $attr_name (qw(data cow horse _private_stuff_cmdline)) { isa_ok($app, 'App'); ok($app->verbose, '... verbosity is turned on as expected'); - is($app->length, 24, '... length is 24 as expected'); - is($app->data, 'file.dat', '... data is foo.txt as expected'); - is_deeply($app->libs, - ['libs/', 'includes/lib'], - '... libs is [libs/, includes/lib] as expected'); - is_deeply($app->details, {}, '... details is {} as expected'); + is($app->length, 24, '... length is 24 as expected'); + is($app->data, 'file.dat', '... data is foo.txt as expected'); + is_deeply($app->libs, + ['libs/', 'includes/lib'], + '... libs is [libs/, includes/lib] as expected'); + is_deeply($app->details, {}, '... details is {} as expected'); } { @@ -150,12 +150,12 @@ foreach my $attr_name (qw(data cow horse _private_stuff_cmdline)) { isa_ok($app, 'App'); ok(!$app->verbose, '... verbosity is turned on as expected'); - is($app->length, 24, '... length is 24 as expected'); - is($app->data, 'file.dat', '... data is foo.txt as expected'); - is_deeply($app->libs, [], '... libs is [] as expected'); - is_deeply($app->details, - { os => 'mac', name => 'foo' }, - '... details is { os => mac, name => foo } as expected'); + is($app->length, 24, '... length is 24 as expected'); + is($app->data, 'file.dat', '... data is foo.txt as expected'); + is_deeply($app->libs, [], '... libs is [] as expected'); + is_deeply($app->details, + { os => 'mac', name => 'foo' }, + '... details is { os => mac, name => foo } as expected'); } { @@ -166,10 +166,10 @@ foreach my $attr_name (qw(data cow horse _private_stuff_cmdline)) { isa_ok($app, 'App'); ok(!$app->verbose, '... verbosity is turned off as expected'); - is($app->length, 24, '... length is 24 as expected'); - is($app->data, 'file.dat', '... file is file.dat as expected'); - is_deeply($app->libs, [], '... libs is [] as expected'); - is_deeply($app->details, {}, '... details is {} as expected'); + is($app->length, 24, '... length is 24 as expected'); + is($app->data, 'file.dat', '... file is file.dat as expected'); + is_deeply($app->libs, [], '... libs is [] as expected'); + is_deeply($app->details, {}, '... details is {} as expected'); } # Test cmd_alias without cmd_flag diff --git a/t/009_gld_and_explicit_options.t b/t/009_gld_and_explicit_options.t index 266ff8c..aa2761c 100644 --- a/t/009_gld_and_explicit_options.t +++ b/t/009_gld_and_explicit_options.t @@ -6,7 +6,7 @@ use warnings; use Test::More; use Test::Exception; -BEGIN { +BEGIN { eval 'use Getopt::Long::Descriptive;'; plan skip_all => "Getopt::Long::Descriptive required for this test" if $@; plan tests => 5; @@ -16,20 +16,20 @@ BEGIN { { package Testing::Foo; use Moose; - + with 'MooseX::Getopt'; - + has 'bar' => ( is => 'ro', - isa => 'Int', + isa => 'Int', required => 1, ); - + has 'baz' => ( is => 'ro', - isa => 'Int', - required => 1, - ); + isa => 'Int', + required => 1, + ); } @ARGV = qw(--bar 10); diff --git a/t/100_gld_default_bug.t b/t/100_gld_default_bug.t index 4a2b42a..29ae2a4 100644 --- a/t/100_gld_default_bug.t +++ b/t/100_gld_default_bug.t @@ -9,16 +9,16 @@ use Test::Exception; BEGIN { eval 'use Getopt::Long::Descriptive;'; plan skip_all => "Getopt::Long::Descriptive required for this test" if $@; - plan tests => 5; + plan tests => 5; use_ok('MooseX::Getopt'); } { package Engine::Foo; use Moose; - + with 'MooseX::Getopt'; - + has 'nproc' => ( metaclass => 'Getopt', is => 'ro', diff --git a/t/102_basic_basic.t b/t/102_basic_basic.t index b5fbcbd..daf32f3 100644 --- a/t/102_basic_basic.t +++ b/t/102_basic_basic.t @@ -12,11 +12,11 @@ BEGIN { { package App; use Moose; - + with 'MooseX::Getopt::Basic'; has 'data' => ( - metaclass => 'MooseX::Getopt::Meta::Attribute', + metaclass => 'MooseX::Getopt::Meta::Attribute', is => 'ro', isa => 'Str', default => 'file.dat', @@ -24,7 +24,7 @@ BEGIN { ); has 'cow' => ( - metaclass => 'Getopt', + metaclass => 'Getopt', is => 'ro', isa => 'Str', default => 'moo', @@ -32,7 +32,7 @@ BEGIN { ); has 'horse' => ( - metaclass => 'MooseX::Getopt::Meta::Attribute', + metaclass => 'MooseX::Getopt::Meta::Attribute', is => 'ro', isa => 'Str', default => 'bray', @@ -48,15 +48,15 @@ BEGIN { has 'verbose' => ( is => 'ro', - isa => 'Bool', + isa => 'Bool', ); - + has 'libs' => ( is => 'ro', isa => 'ArrayRef', default => sub { [] }, - ); - + ); + has 'details' => ( is => 'ro', isa => 'HashRef', @@ -70,13 +70,13 @@ BEGIN { ); has '_private_stuff_cmdline' => ( - metaclass => 'MooseX::Getopt::Meta::Attribute', + metaclass => 'MooseX::Getopt::Meta::Attribute', is => 'ro', isa => 'Int', default => 832, cmd_flag => 'p', ); - + } foreach my $attr_name (qw(data cow horse _private_stuff_cmdline)) { @@ -84,7 +84,7 @@ foreach my $attr_name (qw(data cow horse _private_stuff_cmdline)) { isa_ok($attr, 'Moose::Meta::Attribute'); isa_ok($attr, 'MooseX::Getopt::Meta::Attribute'); can_ok($attr, 'cmd_flag'); - can_ok($attr, 'cmd_aliases'); + can_ok($attr, 'cmd_aliases'); } { @@ -94,10 +94,10 @@ foreach my $attr_name (qw(data cow horse _private_stuff_cmdline)) { isa_ok($app, 'App'); ok(!$app->verbose, '... verbosity is off as expected'); - is($app->length, 24, '... length is 24 as expected'); - is($app->data, 'file.dat', '... data is file.dat as expected'); - is_deeply($app->libs, [], '... libs is [] as expected'); - is_deeply($app->details, {}, '... details is {} as expected'); + is($app->length, 24, '... length is 24 as expected'); + is($app->data, 'file.dat', '... data is file.dat as expected'); + is_deeply($app->libs, [], '... libs is [] as expected'); + is_deeply($app->details, {}, '... details is {} as expected'); } { @@ -107,10 +107,10 @@ foreach my $attr_name (qw(data cow horse _private_stuff_cmdline)) { isa_ok($app, 'App'); ok($app->verbose, '... verbosity is turned on as expected'); - is($app->length, 50, '... length is 50 as expected'); - is($app->data, 'file.dat', '... data is file.dat as expected'); - is_deeply($app->libs, [], '... libs is [] as expected'); - is_deeply($app->details, {}, '... details is {} as expected'); + is($app->length, 50, '... length is 50 as expected'); + is($app->data, 'file.dat', '... data is file.dat as expected'); + is_deeply($app->libs, [], '... libs is [] as expected'); + is_deeply($app->details, {}, '... details is {} as expected'); } { @@ -120,10 +120,10 @@ foreach my $attr_name (qw(data cow horse _private_stuff_cmdline)) { isa_ok($app, 'App'); ok($app->verbose, '... verbosity is turned on as expected'); - is($app->length, 24, '... length is 24 as expected'); - is($app->data, 'foo.txt', '... data is foo.txt as expected'); - is_deeply($app->libs, [], '... libs is [] as expected'); - is_deeply($app->details, {}, '... details is {} as expected'); + is($app->length, 24, '... length is 24 as expected'); + is($app->data, 'foo.txt', '... data is foo.txt as expected'); + is_deeply($app->libs, [], '... libs is [] as expected'); + is_deeply($app->details, {}, '... details is {} as expected'); } { @@ -133,12 +133,12 @@ foreach my $attr_name (qw(data cow horse _private_stuff_cmdline)) { isa_ok($app, 'App'); ok($app->verbose, '... verbosity is turned on as expected'); - is($app->length, 24, '... length is 24 as expected'); - is($app->data, 'file.dat', '... data is foo.txt as expected'); - is_deeply($app->libs, - ['libs/', 'includes/lib'], - '... libs is [libs/, includes/lib] as expected'); - is_deeply($app->details, {}, '... details is {} as expected'); + is($app->length, 24, '... length is 24 as expected'); + is($app->data, 'file.dat', '... data is foo.txt as expected'); + is_deeply($app->libs, + ['libs/', 'includes/lib'], + '... libs is [libs/, includes/lib] as expected'); + is_deeply($app->details, {}, '... details is {} as expected'); } { @@ -148,12 +148,12 @@ foreach my $attr_name (qw(data cow horse _private_stuff_cmdline)) { isa_ok($app, 'App'); ok(!$app->verbose, '... verbosity is turned on as expected'); - is($app->length, 24, '... length is 24 as expected'); - is($app->data, 'file.dat', '... data is foo.txt as expected'); - is_deeply($app->libs, [], '... libs is [] as expected'); - is_deeply($app->details, - { os => 'mac', name => 'foo' }, - '... details is { os => mac, name => foo } as expected'); + is($app->length, 24, '... length is 24 as expected'); + is($app->data, 'file.dat', '... data is foo.txt as expected'); + is_deeply($app->libs, [], '... libs is [] as expected'); + is_deeply($app->details, + { os => 'mac', name => 'foo' }, + '... details is { os => mac, name => foo } as expected'); } { @@ -164,10 +164,10 @@ foreach my $attr_name (qw(data cow horse _private_stuff_cmdline)) { isa_ok($app, 'App'); ok(!$app->verbose, '... verbosity is turned off as expected'); - is($app->length, 24, '... length is 24 as expected'); - is($app->data, 'file.dat', '... file is file.dat as expected'); - is_deeply($app->libs, [], '... libs is [] as expected'); - is_deeply($app->details, {}, '... details is {} as expected'); + is($app->length, 24, '... length is 24 as expected'); + is($app->data, 'file.dat', '... file is file.dat as expected'); + is_deeply($app->libs, [], '... libs is [] as expected'); + is_deeply($app->details, {}, '... details is {} as expected'); } # Test cmd_alias without cmd_flag diff --git a/t/106_no_ignore_case.t b/t/106_no_ignore_case.t index b8b6f11..709ec65 100644 --- a/t/106_no_ignore_case.t +++ b/t/106_no_ignore_case.t @@ -17,7 +17,7 @@ foreach my $role (qw/ $meta->add_attribute('BigD', traits => ['Getopt'], isa => 'Bool', cmd_aliases => ['D'], is => 'ro'); $meta->add_attribute('SmallD', traits => ['Getopt'], isa => 'Bool', - cmd_aliases => ['d'], is => 'ro'); + cmd_aliases => ['d'], is => 'ro'); $role->meta->apply($meta); {