Skip Menu |

This queue is for tickets about the Catalyst-Plugin-Static-Simple CPAN distribution.

Report information
The Basics
Id: 40628
Status: resolved
Priority: 0/
Queue: Catalyst-Plugin-Static-Simple

People
Owner: Nobody in particular
Requestors: ilmari [...] ilmari.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: [PATCH] Port to Class::C3 for CataMoose compat.
Date: Mon, 03 Nov 2008 15:05:30 +0000
To: bug-Catalyst-Plugin-Static-Simple [...] rt.cpan.org
From: ilmari [...] ilmari.org (Dagfinn Ilmari Mannsåker)
Hi, Here's a patch to switch from NEXT to Class::C3 and ->next::method so the plugin will work with the upcoming 5.80 release of Catalyst.
=== Makefile.PL ================================================================== --- Makefile.PL (revision 31391) +++ Makefile.PL (local) @@ -6,6 +6,7 @@ requires 'Catalyst::Runtime' => '5.30'; requires 'MIME::Types' => '1.15'; requires 'Test::More'; +requires 'Class::C3'; unless( can_use 'Catalyst' => '5.33' ) { requires 'File::Slurp'; === lib/Catalyst/Plugin/Static/Simple.pm ================================================================== --- lib/Catalyst/Plugin/Static/Simple.pm (revision 31391) +++ lib/Catalyst/Plugin/Static/Simple.pm (local) @@ -7,6 +7,7 @@ use File::Spec (); use IO::File (); use MIME::Types (); +use Class::C3; our $VERSION = '0.20'; @@ -49,7 +50,7 @@ $c->_locate_static_file( $path ); } - return $c->NEXT::ACTUAL::prepare_action(@_); + return $c->next::method(@_); } sub dispatch { @@ -64,7 +65,7 @@ return $c->_serve_static; } else { - return $c->NEXT::ACTUAL::dispatch(@_); + return $c->next::method(@_); } } @@ -76,13 +77,13 @@ $c->log->debug( 'Static::Simple: ' . join q{ }, @{$c->_debug_msg} ); } - return $c->NEXT::ACTUAL::finalize(@_); + return $c->next::method(@_); } sub setup { my $c = shift; - $c->NEXT::setup(@_); + $c->maybe::next::method(@_); if ( Catalyst->VERSION le '5.33' ) { require File::Slurp;
-- ilmari "A disappointingly low fraction of the human race is, at any given time, on fire." - Stig Sandbeck Mathisen
Applied with slight changes as r9249. Please release to stop the damned Adopt::NEXT warnings? ;)
Released as 0.21.