From: Shawn M Moore Date: Fri, 10 Jul 2009 06:28:14 +0000 (-0400) Subject: Begin doc X-Git-Tag: 0.01~4 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=42065130e0abfd80a7761157cdf7ba9490918743;p=gitmo%2FMooseX-HasDefaults.git Begin doc --- diff --git a/lib/MooseX/HasDefaults.pm b/lib/MooseX/HasDefaults.pm new file mode 100644 index 0000000..4b31d96 --- /dev/null +++ b/lib/MooseX/HasDefaults.pm @@ -0,0 +1,31 @@ +die "Do not use MooseX::HasDefaults, use MooseX::HasDefaults::RO or MooseX::HasDefaults::RW"; + +"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!"; + +__END__ + +=head1 NAME + +MooseX::HasDefaults - default "is" to "ro" or "rw" for all attributes + +=head1 SYNOPSIS + + package Person; + use Moose; + use MooseX::HasDefaults::RO; + + has name => ( + isa => 'Str', + ); + + has age => ( + is => 'rw', + isa => 'Int', + documentation => "Changes most years", + ); + +=head1 DESCRIPTION + + +=cut +