memory leaks on CRUD fixed
[catagits/Reaction.git] / lib / Reaction / UI / ViewPort / Field / Boolean.pm
index 34f7aae..53356ef 100644 (file)
@@ -1,32 +1,16 @@
 package Reaction::UI::ViewPort::Field::Boolean;
 
 use Reaction::Class;
+use aliased 'Reaction::UI::ViewPort::Field';
 
-class Boolean is 'Reaction::UI::ViewPort::Field', which {
+use namespace::clean -except => [ qw(meta) ];
+extends Field;
 
-  has '+value' => (isa => 'Bool');
-  has '+layout' => (default => 'checkbox');
 
-};
+has '+value' => (isa => 'Bool');
 
-1;  
+override _empty_string_value => sub { 0 };
+__PACKAGE__->meta->make_immutable;
 
-=head1 NAME
 
-Reaction::UI::ViewPort::Field::Boolean
-
-=head1 DESCRIPTION
-
-=head1 SEE ALSO
-
-=head2 L<Reaction::UI::ViewPort::Field>
-
-=head1 AUTHORS
-
-See L<Reaction::Class> for authors.
-
-=head1 LICENSE
-
-See L<Reaction::Class> for the license.
-
-=cut
+1;