More doc
[gitmo/MooseX-HasDefaults.git] / lib / MooseX / HasDefaults.pm
CommitLineData
42065130 1die "Do not use MooseX::HasDefaults, use MooseX::HasDefaults::RO or MooseX::HasDefaults::RW";
2
3"Screw you Perl, I want to return a true value just to spite you even though it's a load failure. Can we PLEASE get rid of the required module return value? Require modules to die instead, like I just did. SIGH!";
4
5__END__
6
7=head1 NAME
8
9MooseX::HasDefaults - default "is" to "ro" or "rw" for all attributes
10
11=head1 SYNOPSIS
12
13 package Person;
14 use Moose;
15 use MooseX::HasDefaults::RO;
16
17 has name => (
18 isa => 'Str',
19 );
20
21 has age => (
22 is => 'rw',
23 isa => 'Int',
24 documentation => "Changes most years",
25 );
26
27=head1 DESCRIPTION
28
0fb18126 29The module L<MooseX::HasDefaults::RO> defaults C<is> to C<ro>.
30
31The module L<MooseX::HasDefaults::RW> defaults C<is> to C<rw>.
32
33If you pass a specific value to any C<has>'s C<is>, that overrides the default. If you do not want an accessor, pass C<< is => undef >>.
34
35=head1 AUTHOR
36
37Shawn M Moore, C<sartak@gmail.com>
38
39=head1 COPYRIGHT AND LICENSE
40
41Copyright 2009 Infinity Interactive
42
43This program is free software; you can redistribute it and/or modify it
44under the same terms as Perl itself.
42065130 45
46=cut
47