
MooseX::StrictAttributes - A collection of Attribute and Class traits to turn on various 'strict' features of attributes.

use Moose;
# Apply all traits to all attributes in this class.
use MooseX::StrictAttributeBuilders;
# Or apply to individual attributes
use MooseX::StrictAttributeBuilders ();
has foo => ( is => 'ro', traits => [qw/ StrictAttributeBuilders StrictAttributeIsas /] );

When applied, ensures that any attributes you declare with a builder method actually have an existant builder method in their class, and ensures that when you use an isa type constraint which mentions a class name, that class name corresponds to a loaded class


This software probably contains bugs, and there are much more elegant ways of inheriting default attribute traits than those implemented in this code.
Patches welcome.

Tomas Doran <bobtfish@bobtfish.net> (t0m on #moose)

Copyright 2008 Tomas Doran.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.