[Jifty-commit] r2697 - jifty/trunk/lib/Jifty/Module
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Sun Jan 28 11:08:01 EST 2007
Author: audreyt
Date: Sun Jan 28 11:08:00 2007
New Revision: 2697
Modified:
jifty/trunk/lib/Jifty/Module/Pluggable.pm
Log:
* strict, warnings, and redefinition warning avoidance for J::Module::Pluggable.
Modified: jifty/trunk/lib/Jifty/Module/Pluggable.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Module/Pluggable.pm (original)
+++ jifty/trunk/lib/Jifty/Module/Pluggable.pm Sun Jan 28 11:08:00 2007
@@ -1,4 +1,6 @@
package Jifty::Module::Pluggable;
+use strict;
+use warnings;
use base qw/Module::Pluggable/;
=head1 NAME
@@ -40,6 +42,8 @@
use Module::Pluggable::Object;
use UNIVERSAL::require;
+
+no warnings 'redefine';
sub Module::Pluggable::Object::_require {
my $self = shift;
my $module = shift;
@@ -47,11 +51,9 @@
# Module::Pluggable::Object::_require expects a true value (the error message) on failure
# On success, it expects you to return undef.
- local $UNIVERSAL::require::ERROR = undef;
+ local $UNIVERSAL::require::ERROR;
$module->require(); # We'd prefer to use Jifty::Util->require() here, but it spews crazy warnings
- return $UNIVERSAL::require::ERROR;
-
-
+ return $UNIVERSAL::require::ERROR;
}
1;
More information about the Jifty-commit
mailing list