From: Matt S Trout Date: Mon, 8 Nov 2010 05:15:59 +0000 (+0000) Subject: fixup whitespace once again X-Git-Tag: 0.009001~51 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5d349892bbd0809be2222e3ef3ba1cc9f04d736b;p=gitmo%2FMoo.git fixup whitespace once again --- diff --git a/lib/Class/Tiny.pm b/lib/Class/Tiny.pm index e9f3415..906f25e 100644 --- a/lib/Class/Tiny.pm +++ b/lib/Class/Tiny.pm @@ -56,9 +56,9 @@ sub _constructor_maker_for { ->install_delayed ->register_attribute_specs(do { my @spec; - # using the -last- entry in @ISA means that classes created by - # Role::Tiny as N roles + superclass will still get the attributes - # from the superclass + # using the -last- entry in @ISA means that classes created by + # Role::Tiny as N roles + superclass will still get the attributes + # from the superclass if (my $super = do { no strict 'refs'; ${"${target}::ISA"}[-1] }) { if (my $con = $MAKERS{$super}{constructor}) { @spec = %{$con->all_attribute_specs}; diff --git a/lib/Class/Tiny/Object.pm b/lib/Class/Tiny/Object.pm index 8243116..4ff2cba 100644 --- a/lib/Class/Tiny/Object.pm +++ b/lib/Class/Tiny/Object.pm @@ -13,8 +13,8 @@ sub new { $NO_BUILD{$class} ? bless({ ref($_[0]) eq 'HASH' ? %{$_[0]} : @_ }, $class) : do { - my $proto = ref($_[0]) eq 'HASH' ? $_[0] : { @_ }; - bless({ %$proto }, $class)->BUILDALL($proto); + my $proto = ref($_[0]) eq 'HASH' ? $_[0] : { @_ }; + bless({ %$proto }, $class)->BUILDALL($proto); }; } diff --git a/lib/Method/Generate/Accessor.pm b/lib/Method/Generate/Accessor.pm index 3a33844..263c7f8 100644 --- a/lib/Method/Generate/Accessor.pm +++ b/lib/Method/Generate/Accessor.pm @@ -174,38 +174,38 @@ sub _generate_populate_set { ."\n${get_indent})"; ($spec->{isa} ? " {\n my \$value = ".$get_value.";\n " - .$self->_generate_isa_check( - $name, '$value', $spec->{isa} - ).";\n" - .' '.$self->_generate_simple_set($me, $name, '$value').";\n" - ." }\n" + .$self->_generate_isa_check( + $name, '$value', $spec->{isa} + ).";\n" + .' '.$self->_generate_simple_set($me, $name, '$value').";\n" + ." }\n" : ' '.$self->_generate_simple_set($me, $name, $get_value).";\n" ) .($spec->{trigger} ? ' ' - .$self->_generate_trigger( - $name, $me, $self->_generate_simple_get($me, $name), - $spec->{trigger} - )." if ${test};\n" + .$self->_generate_trigger( + $name, $me, $self->_generate_simple_get($me, $name), + $spec->{trigger} + )." if ${test};\n" : '' ); } else { " if (${test}) {\n" .($spec->{isa} ? " " - .$self->_generate_isa_check( - $name, $source, $spec->{isa} - ).";\n" + .$self->_generate_isa_check( + $name, $source, $spec->{isa} + ).";\n" : "" ) ." ".$self->_generate_simple_set($me, $name, $source).";\n" .($spec->{trigger} - ? " " - .$self->_generate_trigger( - $name, $me, $self->_generate_simple_get($me, $name), - $spec->{trigger} - ).";\n" - : "" + ? " " + .$self->_generate_trigger( + $name, $me, $self->_generate_simple_get($me, $name), + $spec->{trigger} + ).";\n" + : "" ) ." }\n"; } diff --git a/lib/Method/Generate/Constructor.pm b/lib/Method/Generate/Constructor.pm index 0ecf401..08ec982 100644 --- a/lib/Method/Generate/Constructor.pm +++ b/lib/Method/Generate/Constructor.pm @@ -84,8 +84,8 @@ sub _assign_new { join '', ( @init ? ' '.$self->_cap_call($ag->generate_multi_set( - '$new', [ @slots ], '@{$args}{qw('.join(' ',@init).')}' - )).";\n" + '$new', [ @slots ], '@{$args}{qw('.join(' ',@init).')}' + )).";\n" : '' ), map { my $arg_key = perlstring($test{$_});