package Moose::Policy;
use Moose 'confess', 'blessed';
-our $VERSION = '0.03';
+our $VERSION = '0.04';
our $AUTHORITY = 'cpan:STEVAN';
sub import {
# otherwise require it ...
eval { Class::MOP::load_class($policy) };
confess "Could not load policy module '$policy' because : $@"
- if $@;
+ if $@;
}
my $package = caller();
# Foo now has (get, set)_bar methods as well as get_baz
+=head1 DEPRECATION NOTICE
+
+B<Moose::Policy is deprecated>.
+
+L<MooseX::FollowPBP> replaces the L<Moose::Policy::FollowPBP> module. The
+other policies included in this distribution do not yet have standalone MooseX
+modules, as of November, 2010.
+
=head1 DESCRIPTION
This module allows you to specify your project-wide or even company-wide
Moose class.
For instance, L<Moose::Policy::SingleInheritence> enforces that all
-specified Moose classes can only use single inheritence. It does this
+specified Moose classes can only use single inheritance. It does this
by trapping the call to C<superclasses> on the metaclass and only allowing
you to assign a single superclass.
you try to set a Moose::Policy and there is a C<meta> method available,
not only will kittens die, but your program will too.
-=head2 Policys are class scoped
+=head2 Policies are class scoped
-You must repeat the policy for each class you want to us it. It is B<not>
+You must repeat the policy for each class you want to use it. It is B<not>
inherited. This may change in the future, probably it will be a Moose::Policy
-itself to allow Moose policys to be inherited.
+itself to allow Moose policies to be inherited.
=head1 THE POLICY
-A Policy is set by passing C<Moose::Polocy::import()> a package name. This
+A Policy is set by passing C<Moose::Policy::import()> a package name. This
package is then queried for what metaclasses it should use. The possible
metaclass values are:
Roles are an excellent way to combine sets of behaviors together into one, and
custom metaclasses are actually better composed by roles then by inheritence.
The ideal situation is that this module will provide a set of roles which can be
-used to compose you meta-policy with relative ease.
+used to compose your meta-policy with relative ease.
=back