Lots of doc improvements for native delegations.
[gitmo/Moose.git] / lib / Moose / Meta / Attribute / Native / Trait / Bool.pm
index 93cfbe0..b636230 100644 (file)
@@ -31,11 +31,11 @@ Moose::Meta::Attribute::Native::Trait::Bool - Helper trait for Bool attributes
   use Moose;
 
   has 'is_lit' => (
-      traits    => ['Bool'],
-      is        => 'rw',
-      isa       => 'Bool',
-      default   => 0,
-      handles   => {
+      traits  => ['Bool'],
+      is      => 'rw',
+      isa     => 'Bool',
+      default => 0,
+      handles => {
           illuminate  => 'set',
           darken      => 'unset',
           flip_switch => 'toggle',
@@ -44,10 +44,10 @@ Moose::Meta::Attribute::Native::Trait::Bool - Helper trait for Bool attributes
   );
 
   my $room = Room->new();
-  $room->illuminate;     # same as $room->is_lit(1);
-  $room->darken;         # same as $room->is_lit(0);
-  $room->flip_switch;    # same as $room->is_lit(not $room->is_lit);
-  return $room->is_dark; # same as !$room->is_lit
+  $room->illuminate;        # same as $room->is_lit(1);
+  $room->darken;            # same as $room->is_lit(0);
+  $room->flip_switch;       # same as $room->is_lit(not $room->is_lit);
+  return $room->is_dark;    # same as !$room->is_lit
 
 =head1 DESCRIPTION
 
@@ -56,31 +56,27 @@ basic math operations.
 
 =head1 PROVIDED METHODS
 
+None of these methods accept arguments.
+
 =over 4
 
-=item B<set>
+=item * B<set>
 
-Sets the value to C<1>.
+Sets the value to C<1> and returns C<1>.
 
-=item B<unset>
+=item * B<unset>
 
-Set the value to C<0>.
+Set the value to C<0> and returns C<0>.
 
-=item B<toggle>
+=item * B<toggle>
 
 Toggles the value. If it's true, set to false, and vice versa.
 
-=item B<not>
-
-Equivalent of 'not C<$value>'.
-
-=back
-
-=head1 METHODS
+Returns the new value.
 
-=over 4
+=item * B<not>
 
-=item B<meta>
+Equivalent of 'not C<$value>'.
 
 =back