summaryrefslogtreecommitdiff
path: root/lib/MooseX
diff options
context:
space:
mode:
Diffstat (limited to 'lib/MooseX')
-rw-r--r--lib/MooseX/Privacy/Meta/Attribute/Private.pm3
-rw-r--r--lib/MooseX/Privacy/Meta/Attribute/Protected.pm3
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);
};
}