X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMoose%2FMeta%2FAttribute%2FNative%2FTrait%2FBool.pm;h=c8bdb01e355e694681370a854174b67b68e702be;hb=eaf5a43ef108f6a9dce74c84afc25a892cffdfb1;hp=eaa9fd800d2b0077fabcc5fb54f6377fcba88199;hpb=55a9d564966aee166837ff445eafe009a439e328;p=gitmo%2FMoose.git diff --git a/lib/Moose/Meta/Attribute/Native/Trait/Bool.pm b/lib/Moose/Meta/Attribute/Native/Trait/Bool.pm index eaa9fd8..c8bdb01 100644 --- a/lib/Moose/Meta/Attribute/Native/Trait/Bool.pm +++ b/lib/Moose/Meta/Attribute/Native/Trait/Bool.pm @@ -2,7 +2,7 @@ package Moose::Meta::Attribute::Native::Trait::Bool; use Moose::Role; use Moose::Meta::Attribute::Native::MethodProvider::Bool; -our $VERSION = '0.87'; +our $VERSION = '0.90'; $VERSION = eval $VERSION; our $AUTHORITY = 'cpan:STEVAN'; @@ -29,16 +29,15 @@ no Moose::Role; =head1 NAME -Moose::Meta::Attribute::Native::Trait::Bool +Moose::Meta::Attribute::Native::Trait::Bool - Helper trait for Bool attributes =head1 SYNOPSIS package Room; use Moose; - use Moose::AttributeHelpers; has 'is_lit' => ( - traits => ['Bool'], + traits => ['Bool'], is => 'rw', isa => 'Bool', default => 0, @@ -47,7 +46,7 @@ Moose::Meta::Attribute::Native::Trait::Bool darken => 'unset', flip_switch => 'toggle', is_dark => 'not', - } + }, ); my $room = Room->new(); @@ -70,19 +69,19 @@ the attribute. =over 4 -=item I +=item B Sets the value to C<1>. -=item I +=item B Set the value to C<0>. -=item I +=item B -Toggle the value. If it's true, set to false, and vice versa. +Toggles the value. If it's true, set to false, and vice versa. -=item I +=item B Equivalent of 'not C<$value>'. @@ -94,8 +93,6 @@ Equivalent of 'not C<$value>'. =item B -=item B - =item B =item B