From: stevan Date: Sun, 5 Nov 2006 18:37:48 +0000 (+0000) Subject: foo X-Git-Tag: 0_03~1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMoose-Policy.git;a=commitdiff_plain;h=83d8519795e1f562ec8534f8cbd748c6d8fd314f foo --- diff --git a/Changes b/Changes index 5c0b895..6b2827c 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,10 @@ Revision history for Perl extension Moose-Policy +0.02 Sun. Nov. 5, 2006 + - We removed UNIVERSAL::require in Moose recently, and + this module was breaking beacuse of that. It is now + fixed. + 0.01 Wed. Aug. 9, 2006 - module created by Stevan Little and Eric Willhelm, with input form Matt Trout and the #moose crew. \ No newline at end of file diff --git a/README b/README index 624f33b..d30002e 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -Moose::Policy version 0.01 +Moose::Policy version 0.02 =========================== See the individual module documentation for more information diff --git a/lib/Moose/Policy.pm b/lib/Moose/Policy.pm index 4c4e1cb..8225c76 100644 --- a/lib/Moose/Policy.pm +++ b/lib/Moose/Policy.pm @@ -3,7 +3,7 @@ package Moose::Policy; use strict; use warnings; -our $VERSION = '0.01'; +our $VERSION = '0.02'; use Moose (); use Carp 'confess'; @@ -15,8 +15,13 @@ sub import { my $policy = shift || return; unless (Moose::_is_class_already_loaded($policy)) { - ($policy->require) or confess "Could not load policy module " . - "'$policy' because : $UNIVERSAL::require::ERROR"; + # 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" + if $@; } my $package = caller(); @@ -172,7 +177,7 @@ to cpan-RT. Stevan Little Estevan@iinteractive.comE -Eric Wilhelm E...E +Eric Wilhelm =head1 COPYRIGHT AND LICENSE