Merge branch 'master' into attribute_helpers
Hans Dieter Pearcey [Fri, 26 Jun 2009 20:38:55 +0000 (16:38 -0400)]
lib/Moose.pm
lib/Moose/Role.pm
t/020_attributes/021_method_generation_rules.t
t/200_examples/006_example_Protomoose.t
t/300_immutable/002_apply_roles_to_immutable.t
t/600_todo_tests/001_exception_reflects_failed_constraint.t
xt/author/tabs.t [new file with mode: 0644]

index 2372d86..b4ddfcc 100644 (file)
@@ -1,4 +1,6 @@
 package Moose;
+use strict;
+use warnings;
 
 use 5.008;
 
index 687d32c..5b70551 100644 (file)
@@ -1,5 +1,6 @@
-
 package Moose::Role;
+use strict;
+use warnings;
 
 use Scalar::Util 'blessed';
 use Carp         'croak';
index 5876190..d634e57 100644 (file)
@@ -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;
index 8b3d3cf..e0602e0 100644 (file)
@@ -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;
     }
 }
 
index 718c6bd..7976635 100644 (file)
@@ -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;
index 8e89d9a..262ff80 100644 (file)
@@ -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 (file)
index 0000000..1b9c5b9
--- /dev/null
@@ -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');
+