fix matching passwords stuff
[catagits/Reaction.git] / lib / Reaction / UI / ViewPort / Field / Mutable / Array.pm
CommitLineData
ddccc6a2 1package Reaction::UI::ViewPort::Field::Mutable::Array;
2
3use Reaction::Class;
4
81393881 5use namespace::clean -except => [ qw(meta) ];
6extends 'Reaction::UI::ViewPort::Field::Array';
ddccc6a2 7
81393881 8with 'Reaction::UI::ViewPort::Field::Role::Mutable';
9
10around value => sub {
11 my $orig = shift;
12 my $self = shift;
13 return $orig->($self) unless @_;
14 my $value = defined $_[0] ? $_[0] : [];
15 $orig->($self, (ref $value eq 'ARRAY' ? $value : [ $value ]));
ddccc6a2 16};
81393881 17__PACKAGE__->meta->make_immutable;
18
ddccc6a2 19
201;
21