X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMoose%2FMeta%2FAttribute%2FNative%2FTrait%2FBool.pm;h=ec5ae6672bd693bf0bae69d7e6d0999db32fd062;hb=a6f9a6cd26513ba2457f5b54bab12bee84bca5a1;hp=d5e4dd0fc6eb062c6fc616e78f427d4a0c7bb1b1;hpb=157e0475594f2c7d9316491578a38a3b018de3e7;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 d5e4dd0..ec5ae66 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.89'; +our $VERSION = '0.93_02'; $VERSION = eval $VERSION; our $AUTHORITY = 'cpan:STEVAN'; @@ -11,9 +11,6 @@ with 'Moose::Meta::Attribute::Native::Trait'; sub _default_is { 'rw' } sub _helper_type { 'Bool' } -# NOTE: we don't use the method provider for this module since many of -# the names of the provided methods would conflict with keywords - SL - has 'method_provider' => ( is => 'ro', isa => 'ClassName', @@ -29,7 +26,7 @@ no Moose::Role; =head1 NAME -Moose::Meta::Attribute::Native::Trait::Bool +Moose::Meta::Attribute::Native::Trait::Bool - Helper trait for Bool attributes =head1 SYNOPSIS @@ -37,7 +34,7 @@ Moose::Meta::Attribute::Native::Trait::Bool use Moose; has 'is_lit' => ( - traits => ['Bool'], + traits => ['Bool'], is => 'rw', isa => 'Bool', default => 0, @@ -46,7 +43,7 @@ Moose::Meta::Attribute::Native::Trait::Bool darken => 'unset', flip_switch => 'toggle', is_dark => 'not', - } + }, ); my $room = Room->new(); @@ -69,19 +66,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 Toggles the value. If it's true, set to false, and vice versa. -=item I +=item B Equivalent of 'not C<$value>'. @@ -93,8 +90,6 @@ Equivalent of 'not C<$value>'. =item B -=item B - =item B =item B @@ -103,9 +98,7 @@ Equivalent of 'not C<$value>'. =head1 BUGS -All complex software has bugs lurking in it, and this module is no -exception. If you find a bug please either email me, or add the bug -to cpan-RT. +See L for details on reporting bugs. =head1 AUTHOR