Add a couple of missing package descriptions.
[gitmo/Moose.git] / lib / Moose / Meta / Attribute / Native / MethodProvider / Bool.pm
1
2 package Moose::Meta::Attribute::Native::MethodProvider::Bool;
3 use Moose::Role;
4
5 our $VERSION   = '0.95';
6 $VERSION = eval $VERSION;
7 our $AUTHORITY = 'cpan:STEVAN';
8
9 sub set : method {
10     my ( $attr, $reader, $writer ) = @_;
11     return sub { $writer->( $_[0], 1 ) };
12 }
13
14 sub unset : method {
15     my ( $attr, $reader, $writer ) = @_;
16     return sub { $writer->( $_[0], 0 ) };
17 }
18
19 sub toggle : method {
20     my ( $attr, $reader, $writer ) = @_;
21     return sub { $writer->( $_[0], !$reader->( $_[0] ) ) };
22 }
23
24 sub not : method {
25     my ( $attr, $reader, $writer ) = @_;
26     return sub { !$reader->( $_[0] ) };
27 }
28
29 1;
30
31 __END__
32
33 =pod
34
35 =head1 NAME
36
37 Moose::Meta::Attribute::Native::MethodProvider::Bool - role providing method generators for Bool trait
38
39 =head1 DESCRIPTION
40
41 This is a role which provides the method generators for
42 L<Moose::Meta::Attribute::Native::Trait::Bool>. Please check there for
43 documentation on what methods are provided.
44
45 =head1 METHODS
46
47 =over 4
48
49 =item B<meta>
50
51 =back
52
53 =head1 BUGS
54
55 See L<Moose/BUGS> for details on reporting bugs.
56
57 =head1 AUTHOR
58
59 Jason May E<lt>jason.a.may@gmail.comE<gt>
60
61 =head1 COPYRIGHT AND LICENSE
62
63 Copyright 2007-2009 by Infinity Interactive, Inc.
64
65 L<http://www.iinteractive.com>
66
67 This library is free software; you can redistribute it and/or modify
68 it under the same terms as Perl itself.
69
70 =cut