From: stevan Date: Sun, 15 Apr 2007 01:29:54 +0000 (+0000) Subject: 0.03 X-Git-Tag: 0_04~8 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4fe62f68340c866014b87e5f959253a3cf5df4ca;p=gitmo%2FMoose-Policy.git 0.03 --- diff --git a/Build.PL b/Build.PL index 50c9145..d56c53e 100644 --- a/Build.PL +++ b/Build.PL @@ -5,10 +5,8 @@ use strict; my $build = Module::Build->new( module_name => 'Moose::Policy', license => 'perl', - requires => { - 'Scalar::Util' => '1.18', - 'Carp' => '0', - 'Moose' => '0.11', + requires => { + 'Moose' => '0.20', }, optional => { }, diff --git a/Changes b/Changes index 58eeb1c..2dca01d 100644 --- a/Changes +++ b/Changes @@ -1,8 +1,10 @@ Revision history for Perl extension Moose-Policy -0.03 +0.03 Sat. April 14th, 2007 - changing it to use the Class::MOP::is_class_loaded - instead. + and Class::MOP::load_class instead. + - fixed the metaclass loading to work with newer + versions of Class::MOP 0.02 Sun. Nov. 5, 2006 - We removed UNIVERSAL::require in Moose recently, and diff --git a/README b/README index d30002e..c15c472 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -Moose::Policy version 0.02 +Moose::Policy version 0.03 =========================== See the individual module documentation for more information @@ -16,13 +16,11 @@ DEPENDENCIES This module requires these other modules and libraries: - Carp - Scalar::Util Moose COPYRIGHT AND LICENCE -Copyright (C) 2006 Infinity Interactive, Inc. +Copyright (C) 2006-2007 Infinity Interactive, Inc. http://www.iinteractive.com diff --git a/lib/Moose/Policy.pm b/lib/Moose/Policy.pm index d462f8b..87851d6 100644 --- a/lib/Moose/Policy.pm +++ b/lib/Moose/Policy.pm @@ -1,13 +1,8 @@ package Moose::Policy; +use Moose 'confess', 'blessed'; -use strict; -use warnings; - -our $VERSION = '0.03'; - -use Moose (); -use Carp 'confess'; -use Scalar::Util 'blessed'; +our $VERSION = '0.03'; +our $AUTHORITY = 'cpan:STEVAN'; sub import { shift; @@ -16,11 +11,8 @@ sub import { unless (Class::MOP::is_class_loaded($policy)) { # otherwise require it ... - my $file = $policy . '.pm'; - $file =~ s{::}{/}g; - eval { CORE::require($file) }; - confess "Could not load policy module " . - "'$policy' because : $UNIVERSAL::require::ERROR" + eval { Class::MOP::load_class($policy) }; + confess "Could not load policy module '$policy' because : $@" if $@; } @@ -35,7 +27,7 @@ sub import { my %options; # build options out of policy's constants - $policy->can($_) and $options{":$_"} = $policy->$_($package) + $policy->can($_) and $options{"$_"} = $policy->$_($package) for (qw( attribute_metaclass instance_metaclass @@ -60,7 +52,7 @@ __END__ =head1 NAME -Moose::Policy - moose-mounted police +Moose::Policy - Moose-mounted police =head1 SYNOPSIS @@ -84,7 +76,7 @@ metaclasses, however fiddling with the metaclasses can be hairy. Moose::Policy removes most of that hairiness and makes it possible to cleanly contain a set of meta-level customizations in one easy to use module. -This is the first release of this module and it should not be considered to +This is still an release of this module and it should not be considered to be complete by any means. It is very basic implemenation at this point and will likely get more feature-full over time, as people request features. So if you have a suggestion/need/idea, please speak up. @@ -150,6 +142,14 @@ For examples of what a Policy actually looks like see the examples in C and the test suite. More docs to come on this later (probably a cookbook or something). +=head1 METHODS + +=over 4 + +=item B + +=back + =head1 FUTURE PLANS As I said above, this is the first release and it is by no means feature complete. @@ -181,7 +181,7 @@ Eric Wilhelm =head1 COPYRIGHT AND LICENSE -Copyright 2006 by Infinity Interactive, Inc. +Copyright 2006-2007 by Infinity Interactive, Inc. L diff --git a/lib/Moose/Policy/FollowPBP.pm b/lib/Moose/Policy/FollowPBP.pm index 140eb63..a47c358 100644 --- a/lib/Moose/Policy/FollowPBP.pm +++ b/lib/Moose/Policy/FollowPBP.pm @@ -67,7 +67,7 @@ Stevan Little Estevan@iinteractive.comE =head1 COPYRIGHT AND LICENSE -Copyright 2006 by Infinity Interactive, Inc. +Copyright 2006-2007 by Infinity Interactive, Inc. L diff --git a/lib/Moose/Policy/JavaAccessors.pm b/lib/Moose/Policy/JavaAccessors.pm index 0bb5e49..4a29979 100644 --- a/lib/Moose/Policy/JavaAccessors.pm +++ b/lib/Moose/Policy/JavaAccessors.pm @@ -73,7 +73,7 @@ Stevan Little Estevan@iinteractive.comE =head1 COPYRIGHT AND LICENSE -Copyright 2006 by Infinity Interactive, Inc. +Copyright 2006-2007 by Infinity Interactive, Inc. L diff --git a/lib/Moose/Policy/SingleInheritence.pm b/lib/Moose/Policy/SingleInheritence.pm index 4addcf6..9228f51 100644 --- a/lib/Moose/Policy/SingleInheritence.pm +++ b/lib/Moose/Policy/SingleInheritence.pm @@ -65,7 +65,7 @@ Stevan Little Estevan@iinteractive.comE =head1 COPYRIGHT AND LICENSE -Copyright 2006 by Infinity Interactive, Inc. +Copyright 2006-2007 by Infinity Interactive, Inc. L