From: Matt S Trout Date: Mon, 1 Feb 2010 17:51:17 +0000 (+0000) Subject: from override to around, because that actually works X-Git-Tag: v0.29~1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7c97dd210f9079300f1b67fcba852e95203f4cb3;p=catagits%2FCatalyst-Plugin-Static-Simple.git from override to around, because that actually works --- diff --git a/Changes b/Changes index 1c93d0f..b2cdcec 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,7 @@ Revision history for Perl extension Catalyst::Plugin::Static::Simple + - Switch from override to around, because really, wtf + 0.28 2010-01-04 13:15:00 - Fix issues in debug mode. (RT#53338) diff --git a/lib/Catalyst/Plugin/Static/Simple.pm b/lib/Catalyst/Plugin/Static/Simple.pm index 305dd61..05e4c8a 100644 --- a/lib/Catalyst/Plugin/Static/Simple.pm +++ b/lib/Catalyst/Plugin/Static/Simple.pm @@ -60,7 +60,8 @@ before prepare_action => sub { } }; -override dispatch => sub { +around dispatch => sub { + my $orig = shift; my $c = shift; return if ( $c->res->status != 200 ); @@ -72,7 +73,7 @@ override dispatch => sub { return $c->_serve_static; } else { - return super; + return $c->$orig(@_); } }; @@ -569,6 +570,8 @@ Tomas Doran, Justin Wheeler (dnm) +Matt S Trout, + =head1 THANKS The authors of Catalyst::Plugin::Static: