[Catalyst-commits] r12847 - in trunk/Catalyst-Plugin-LogWarnings: .
lib/Catalyst/Plugin
t0m at dev.catalyst.perl.org
t0m at dev.catalyst.perl.org
Tue Feb 9 02:56:59 GMT 2010
Author: t0m
Date: 2010-02-09 02:56:57 +0000 (Tue, 09 Feb 2010)
New Revision: 12847
Modified:
trunk/Catalyst-Plugin-LogWarnings/Makefile.PL
trunk/Catalyst-Plugin-LogWarnings/lib/Catalyst/Plugin/LogWarnings.pm
Log:
Fix Class::C3 vs MRO::Compat.
Modified: trunk/Catalyst-Plugin-LogWarnings/Makefile.PL
===================================================================
--- trunk/Catalyst-Plugin-LogWarnings/Makefile.PL 2010-02-09 02:44:36 UTC (rev 12846)
+++ trunk/Catalyst-Plugin-LogWarnings/Makefile.PL 2010-02-09 02:56:57 UTC (rev 12847)
@@ -11,8 +11,7 @@
PREREQ_PM => {
'Test::More' => 0,
'Catalyst::Runtime' => 5.7001,
- 'Class::C3' => 0.20,
- 'Catalyst::Plugin::C3' => 0,
+ 'MRO::Compat' => 0,
},
dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
clean => { FILES => 'Catalyst-Plugin-LogWarnings-*' },
Modified: trunk/Catalyst-Plugin-LogWarnings/lib/Catalyst/Plugin/LogWarnings.pm
===================================================================
--- trunk/Catalyst-Plugin-LogWarnings/lib/Catalyst/Plugin/LogWarnings.pm 2010-02-09 02:44:36 UTC (rev 12846)
+++ trunk/Catalyst-Plugin-LogWarnings/lib/Catalyst/Plugin/LogWarnings.pm 2010-02-09 02:56:57 UTC (rev 12847)
@@ -2,8 +2,7 @@
use warnings;
use strict;
-use Class::C3;
-use base qw(Catalyst::Plugin::C3);
+use MRO::Compat;
=head1 NAME
@@ -54,19 +53,19 @@
sub execute {
my $c = shift;
if(eval{$c->log->can('warn')}){
- return do {
- local $SIG{__WARN__} = sub {
- my $warning = shift;
- chomp $warning;
- $c->log->warn($warning);
+ return do {
+ local $SIG{__WARN__} = sub {
+ my $warning = shift;
+ chomp $warning;
+ $c->log->warn($warning);
+ };
+ $c->next::method(@_);
};
- $c->next::method(@_);
- }
}
else {
- # warn "Can't log warnings";
- # if we can't log warnings, don't catch them
- return $c->next::method(@_);
+ # warn "Can't log warnings";
+ # if we can't log warnings, don't catch them
+ return $c->next::method(@_);
}
}
More information about the Catalyst-commits
mailing list