From 4d09e0bfc17d62df7bc6a477fca4e4788b03960e Mon Sep 17 00:00:00 2001 From: franck cuny Date: Wed, 28 Apr 2010 22:04:14 +0200 Subject: remove dwimmery --- lib/MooseX/Privacy/Meta/Attribute/Private.pm | 3 +-- 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); }; } -- cgit 1.4.1