aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Reaction/UI/ViewPort/Field/Mutable/Boolean.pm
blob: 0007bc8faa00afb947f41a2be7c3d80091640c26 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package Reaction::UI::ViewPort::Field::Mutable::Boolean;

use Reaction::Class;

class Boolean is 'Reaction::UI::ViewPort::Field::Boolean', which{
  does 'Reaction::UI::ViewPort::Field::Role::Mutable::Simple';

  implements adopt_value_string => as {
    my ($self) = @_;
warn "WAHEY ".$self->value_string." ".$self;
    $self->value($self->value_string);
  };

  implements BUILD => as {
    my($self) = @_;
    $self->value(0) unless $self->has_value;
  };

};

1;