From: Hans Dieter Pearcey Date: Fri, 26 Jun 2009 20:38:55 +0000 (-0400) Subject: Merge branch 'master' into attribute_helpers X-Git-Tag: 0.89_02~112 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=755f5ecbf4a469a3c5eaef036a4d9a5630406dcd;hp=a3d9821854b052170e8ca2ff0b3b18298e7be28c;p=gitmo%2FMoose.git Merge branch 'master' into attribute_helpers --- diff --git a/lib/Moose.pm b/lib/Moose.pm index 2372d86..b4ddfcc 100644 --- a/lib/Moose.pm +++ b/lib/Moose.pm @@ -1,4 +1,6 @@ package Moose; +use strict; +use warnings; use 5.008; diff --git a/lib/Moose/Role.pm b/lib/Moose/Role.pm index 687d32c..5b70551 100644 --- a/lib/Moose/Role.pm +++ b/lib/Moose/Role.pm @@ -1,5 +1,6 @@ - package Moose::Role; +use strict; +use warnings; use Scalar::Util 'blessed'; use Carp 'croak'; diff --git a/t/020_attributes/021_method_generation_rules.t b/t/020_attributes/021_method_generation_rules.t index 5876190..d634e57 100644 --- a/t/020_attributes/021_method_generation_rules.t +++ b/t/020_attributes/021_method_generation_rules.t @@ -18,11 +18,11 @@ use Test::Exception; =cut sub make_class { - my ($is, $attr, $class) = @_; + my ($is, $attr, $class) = @_; - eval "package $class; use Moose; has 'foo' => ( is => '$is', $attr => '_foo' );"; + eval "package $class; use Moose; has 'foo' => ( is => '$is', $attr => '_foo' );"; - return $@ ? die $@ : $class; + return $@ ? die $@ : $class; } my $obj; diff --git a/t/200_examples/006_example_Protomoose.t b/t/200_examples/006_example_Protomoose.t index 8b3d3cf..e0602e0 100644 --- a/t/200_examples/006_example_Protomoose.t +++ b/t/200_examples/006_example_Protomoose.t @@ -166,9 +166,9 @@ Well cause merlyn asked if it could :) ? $_[0] : $_[0]->meta->prototype_instance; my (undef, %params) = @_; - my $self = $prototype->meta->clone_object($prototype, %params); - $self->BUILDALL(\%params); - return $self; + my $self = $prototype->meta->clone_object($prototype, %params); + $self->BUILDALL(\%params); + return $self; } } diff --git a/t/300_immutable/002_apply_roles_to_immutable.t b/t/300_immutable/002_apply_roles_to_immutable.t index 718c6bd..7976635 100644 --- a/t/300_immutable/002_apply_roles_to_immutable.t +++ b/t/300_immutable/002_apply_roles_to_immutable.t @@ -24,7 +24,7 @@ use Test::Exception; sub baz { 'Foo::baz' } - __PACKAGE__->meta->make_immutable(debug => 0); + __PACKAGE__->meta->make_immutable(debug => 0); } my $foo = Foo->new; diff --git a/t/600_todo_tests/001_exception_reflects_failed_constraint.t b/t/600_todo_tests/001_exception_reflects_failed_constraint.t index 8e89d9a..262ff80 100644 --- a/t/600_todo_tests/001_exception_reflects_failed_constraint.t +++ b/t/600_todo_tests/001_exception_reflects_failed_constraint.t @@ -11,23 +11,23 @@ use Test::More tests => 4; use Test::Exception; BEGIN { - use_ok('Moose::Util::TypeConstraints'); + use_ok('Moose::Util::TypeConstraints'); } lives_ok { - subtype 'ParentConstraint' => as 'Str' => where {0}; + subtype 'ParentConstraint' => as 'Str' => where {0}; } 'specified parent type constraint'; my $tc; lives_ok { - $tc = subtype 'ChildConstraint' => as 'ParentConstraint' => where {1}; + $tc = subtype 'ChildConstraint' => as 'ParentConstraint' => where {1}; } 'specified child type constraint'; { - my $errmsg = $tc->validate(); + my $errmsg = $tc->validate(); - TODO: { - local $TODO = 'Not yet supported'; - ok($errmsg !~ /Validation failed for 'ChildConstraint'/, 'exception references failing parent constraint'); - }; + TODO: { + local $TODO = 'Not yet supported'; + ok($errmsg !~ /Validation failed for 'ChildConstraint'/, 'exception references failing parent constraint'); + }; } diff --git a/xt/author/tabs.t b/xt/author/tabs.t new file mode 100644 index 0000000..1b9c5b9 --- /dev/null +++ b/xt/author/tabs.t @@ -0,0 +1,13 @@ +#!/usr/bin/perl + +use strict; +use warnings; + +use Test::More; + +eval "use Test::NoTabs 0.8"; +plan skip_all => "Test::NoTabs 0.8 required for testing tabs" if $@; + +# Module::Install has tabs, so we can't check 'inc' or ideally '.' +all_perl_files_ok('lib', 't', 'xt'); +