diff options
author | franck cuny <franck@lumberjaph.net> | 2010-04-28 22:04:14 +0200 |
---|---|---|
committer | franck cuny <franck@lumberjaph.net> | 2010-04-28 22:04:14 +0200 |
commit | 4d09e0bfc17d62df7bc6a477fca4e4788b03960e (patch) | |
tree | 4431812959fcb2cdfc085cbc1750acf9be94d24d | |
parent | remove roles (diff) | |
download | moosex-privacy-4d09e0bfc17d62df7bc6a477fca4e4788b03960e.tar.gz |
remove dwimmery
-rw-r--r-- | lib/MooseX/Privacy/Meta/Attribute/Private.pm | 3 | ||||
-rw-r--r-- | lib/MooseX/Privacy/Meta/Attribute/Protected.pm | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/lib/MooseX/Privacy/Meta/Attribute/Private.pm b/lib/MooseX/Privacy/Meta/Attribute/Private.pm index e230b40..9e5bc70 100644 --- a/lib/MooseX/Privacy/Meta/Attribute/Private.pm +++ b/lib/MooseX/Privacy/Meta/Attribute/Private.pm @@ -19,8 +19,7 @@ sub _generate_accessor_method { my $caller = ( scalar caller() ); confess "Attribute " . $attr->name . " is private" unless $caller eq $package_name; - $attr->set_value( $self, $_[0] ) if scalar(@_) == 1; - $attr->set_value( $self, [@_] ) if scalar(@_) > 1; + $attr->set_value( $self, $_[0] ) if scalar @_;; $attr->get_value($self); }; } diff --git a/lib/MooseX/Privacy/Meta/Attribute/Protected.pm b/lib/MooseX/Privacy/Meta/Attribute/Protected.pm index 784f5e4..063a2c0 100644 --- a/lib/MooseX/Privacy/Meta/Attribute/Protected.pm +++ b/lib/MooseX/Privacy/Meta/Attribute/Protected.pm @@ -20,8 +20,7 @@ sub _generate_accessor_method { confess "Attribute " . $attr->name . " is protected" unless $caller eq $self->meta->name or $caller->isa( $package_name ); - $attr->set_value( $self, $_[0] ) if scalar(@_) == 1; - $attr->set_value( $self, [@_] ) if scalar(@_) > 1; + $attr->set_value( $self, $_[0] ) if scalar @_; $attr->get_value($self); }; } |