X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMooseX%2FHasDefaults.pm;fp=lib%2FMooseX%2FHasDefaults.pm;h=4b31d96b40c6e01b2a9c74fed42c73abb030d21c;hb=42065130e0abfd80a7761157cdf7ba9490918743;hp=0000000000000000000000000000000000000000;hpb=e24f444c3571dea24de1bab39c6807aebac88108;p=gitmo%2FMooseX-HasDefaults.git 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 +