From: Graham Knop Date: Thu, 11 Jul 2013 00:09:26 +0000 (-0400) Subject: de-tabify X-Git-Tag: v1.003000~17 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMoo.git;a=commitdiff_plain;h=88862a82b67e8a6259db6a541634aad36fe3cf6d de-tabify --- diff --git a/t/accessor-roles.t b/t/accessor-roles.t index 5fc5e09..3fcda2d 100644 --- a/t/accessor-roles.t +++ b/t/accessor-roles.t @@ -28,17 +28,17 @@ is $c->two, "two", "attr default set from role"; is $c->three, "three", "attr default set from role"; { - package Deux; use Moo; with 'One::P1'; - ::like( - ::exception { has two => (is => 'ro', default => sub { 'II' }); }, - qr{^You cannot overwrite a locally defined method \(two\) with a reader}, - 'overwriting accesssors with roles fails' - ); + package Deux; use Moo; with 'One::P1'; + ::like( + ::exception { has two => (is => 'ro', default => sub { 'II' }); }, + qr{^You cannot overwrite a locally defined method \(two\) with a reader}, + 'overwriting accesssors with roles fails' + ); } { - package Two; use Moo; with 'One::P1'; - has '+two' => (is => 'ro', default => sub { 'II' }); + package Two; use Moo; with 'One::P1'; + has '+two' => (is => 'ro', default => sub { 'II' }); } is(Two->new->two, 'II', "overwriting accessors using +attr works"); diff --git a/t/global_underscore.t b/t/global_underscore.t index da11492..d283824 100644 --- a/t/global_underscore.t +++ b/t/global_underscore.t @@ -6,18 +6,18 @@ use lib qw(t/lib); use_ok('UnderscoreClass'); is( - UnderscoreClass->c1, - 'c1', + UnderscoreClass->c1, + 'c1', ); is( - UnderscoreClass->r1, - 'r1', + UnderscoreClass->r1, + 'r1', ); is( - ClobberUnderscore::h1(), - 'h1', + ClobberUnderscore::h1(), + 'h1', ); done_testing; diff --git a/t/not-both.t b/t/not-both.t index 8236490..b894b1f 100644 --- a/t/not-both.t +++ b/t/not-both.t @@ -3,15 +3,15 @@ use Test::More; # Compile-time exceptions, so need stringy eval; hence not Test::Fatal. { - local $@; - ok not eval q { package XXX; use Moo; use Moo::Role; 1; }; - like $@, qr{Cannot import Moo::Role into a Moo class}; + local $@; + ok not eval q { package XXX; use Moo; use Moo::Role; 1; }; + like $@, qr{Cannot import Moo::Role into a Moo class}; } { - local $@; - ok not eval q { package YYY; use Moo::Role; use Moo; 1; }; - like $@, qr{Cannot import Moo into a role}; + local $@; + ok not eval q { package YYY; use Moo::Role; use Moo; 1; }; + like $@, qr{Cannot import Moo into a role}; } done_testing; diff --git a/t/overloaded-coderefs.t b/t/overloaded-coderefs.t index 0c195c9..058db11 100644 --- a/t/overloaded-coderefs.t +++ b/t/overloaded-coderefs.t @@ -4,29 +4,29 @@ use Test::More; my $codified = 0; { - package Dark::Side; - use overload - q[&{}] => sub { $codified++; shift->to_code }, - fallback => 1; - sub new { - my $class = shift; - my $code = shift; - bless \$code, $class; - } - sub to_code { - my $self = shift; - eval "sub { $$self }"; - } + package Dark::Side; + use overload + q[&{}] => sub { $codified++; shift->to_code }, + fallback => 1; + sub new { + my $class = shift; + my $code = shift; + bless \$code, $class; + } + sub to_code { + my $self = shift; + eval "sub { $$self }"; + } } { - package The::Force; - use Sub::Quote; - use base 'Dark::Side'; - sub to_code { - my $self = shift; - return quote_sub $$self; - } + package The::Force; + use Sub::Quote; + use base 'Dark::Side'; + sub to_code { + my $self = shift; + return quote_sub $$self; + } } my $darkside = Dark::Side->new('my $dummy = "join the dark side"; $_[0] * 2'); @@ -37,10 +37,10 @@ is($theforce->(6), 12, 'check The::Force coderef'); my $luke = The::Force->new('my $z = "I am your father"'); { - package Doubleena; - use Moo; - has a => (is => "rw", coerce => $darkside, isa => sub { 1 }); - has b => (is => "rw", coerce => $theforce, isa => $luke); + package Doubleena; + use Moo; + has a => (is => "rw", coerce => $darkside, isa => sub { 1 }); + has b => (is => "rw", coerce => $theforce, isa => $luke); } my $o = Doubleena->new(a => 11, b => 12); @@ -59,18 +59,18 @@ like($constructor, qr{I am your father}, 'Sub::Quoted isa got inlined'); require Scalar::Util; is( - Scalar::Util::refaddr($luke), - Scalar::Util::refaddr( - Moo->_constructor_maker_for("Doubleena")->all_attribute_specs->{"b"}{"isa"} - ), - '$spec->{isa} reference is not mutated', + Scalar::Util::refaddr($luke), + Scalar::Util::refaddr( + Moo->_constructor_maker_for("Doubleena")->all_attribute_specs->{"b"}{"isa"} + ), + '$spec->{isa} reference is not mutated', ); is( - Scalar::Util::refaddr($theforce), - Scalar::Util::refaddr( - Moo->_constructor_maker_for("Doubleena")->all_attribute_specs->{"b"}{"coerce"} - ), - '$spec->{coerce} reference is not mutated', + Scalar::Util::refaddr($theforce), + Scalar::Util::refaddr( + Moo->_constructor_maker_for("Doubleena")->all_attribute_specs->{"b"}{"coerce"} + ), + '$spec->{coerce} reference is not mutated', ); done_testing;