Commit | Line | Data |
---|---|---|
ddccc6a2 | 1 | package Reaction::UI::ViewPort::Field::Mutable::Boolean; |
2 | ||
3 | use Reaction::Class; | |
4 | ||
5 | class Boolean is 'Reaction::UI::ViewPort::Field::Boolean', which{ | |
62ffa273 | 6 | does 'Reaction::UI::ViewPort::Field::Role::Mutable::Simple'; |
7 | ||
8 | implements adopt_value_string => as { | |
9 | my ($self) = @_; | |
10 | $self->value($self->value_string); | |
11 | }; | |
3fad510b | 12 | |
13 | implements BUILD => as { | |
14 | my($self) = @_; | |
15 | $self->value(0) unless $self->has_value; | |
16 | }; | |
17 | ||
ddccc6a2 | 18 | }; |
19 | ||
20 | 1; |