[Catalyst-commits] r9750 - in Catalyst-Plugin-Compress/trunk: .
lib/Catalyst/Plugin
xinming at dev.catalyst.perl.org
xinming at dev.catalyst.perl.org
Sun Apr 19 18:13:14 GMT 2009
Author: xinming
Date: 2009-04-19 19:13:13 +0100 (Sun, 19 Apr 2009)
New Revision: 9750
Modified:
Catalyst-Plugin-Compress/trunk/Makefile.PL
Catalyst-Plugin-Compress/trunk/lib/Catalyst/Plugin/Compress.pm
Log:
Make use of MRO::Compat for Catalyst::Plugin::Compress
Modified: Catalyst-Plugin-Compress/trunk/Makefile.PL
===================================================================
--- Catalyst-Plugin-Compress/trunk/Makefile.PL 2009-04-19 18:10:01 UTC (rev 9749)
+++ Catalyst-Plugin-Compress/trunk/Makefile.PL 2009-04-19 18:13:13 UTC (rev 9750)
@@ -7,7 +7,8 @@
requires 'Compress::Zlib';
recommends 'Compress::Bzip2' => 2;
-requires 'Catalyst::Runtime' => '5.7006';
+requires 'MRO::Compat';
+requires 'Catalyst::Runtime' => '5.80001';
auto_install;
WriteAll;
Modified: Catalyst-Plugin-Compress/trunk/lib/Catalyst/Plugin/Compress.pm
===================================================================
--- Catalyst-Plugin-Compress/trunk/lib/Catalyst/Plugin/Compress.pm 2009-04-19 18:10:01 UTC (rev 9749)
+++ Catalyst-Plugin-Compress/trunk/lib/Catalyst/Plugin/Compress.pm 2009-04-19 18:13:13 UTC (rev 9750)
@@ -2,7 +2,7 @@
use strict;
use Catalyst::Utils;
-use NEXT;
+use MRO::Compat;
our $VERSION = '';
@@ -60,7 +60,7 @@
*_do_compress = \&{"_${_method}_compress"};
}
- $c->NEXT::setup(@_);
+ $c->next::method(@_);
}
sub finalize {
@@ -72,13 +72,13 @@
or ($c->res->status != 200)
or ($c->res->content_type !~ /^text|xml$|javascript$/)
) {
- return $c->NEXT::finalize;
+ return $c->next::method(@_);
}
my $accept = $c->request->header('Accept-Encoding') || '';
unless (index($accept, $_method) >= 0) {
- return $c->NEXT::finalize;
+ return $c->next::method(@_);
}
my $body = $c->res->body;
@@ -94,7 +94,7 @@
$c->response->content_encoding($_method);
$c->response->headers->push_header('Vary', 'Accept-Encoding');
- $c->NEXT::finalize;
+ $c->next::method(@_);
}
1;
More information about the Catalyst-commits
mailing list