[Catalyst] Migrating mod_perl app to Catalyst

J. Shirley jshirley at gmail.com
Tue Apr 28 21:58:20 GMT 2009


On Wed, Apr 29, 2009 at 4:58 AM, Matt S Trout <dbix-class at trout.me.uk>wrote:

> On Mon, Apr 27, 2009 at 01:54:12PM -0500, Michael Reddick wrote:
> > Does anyone have any advice for migrating a large mod_perl app that has
> no
> > tests to catalyst?
> >
> > I already know of Catalyst::Controller::WrapCGI which seems to be a good
> > start.
>
> Assuming your app doesn't use apache specific stuff.
>
> What I tend to recommend in such cases is to start writing new
> functionality
> in Catalyst as FastCGI and just map chunks of the URI space across to the
> new stuff. When you need to significantly alter the old code, port it
> first.
>
> Eventually you'll just have a Catalyst+FastCGI codebase, and you'll have
> had
> working code at every stage.
>
>
I've done similar things, and my new method is to have a two tiered
application where my Cat app sits in front of legacy, and on unhandled URLs
throws a 404.  The front-end proxy (Varnish, in my case) then restarts the
request against the next backend, which is the mod_perl system.

Then, when I put in new features in Catalyst if the URL is changed I can
simply put in a permanent redirect and everything just works.

This is roughly a new technique, and lacking some fine tuning points, but so
far I'm very happy with it.  I wrote up a posting about my implementation
(which has some other nits):
http://our.coldhardcode.com/jshirley/2009/04/varnish-and-movabletype-for-co=
.html

-J
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20090429/72674=
888/attachment.htm


More information about the Catalyst mailing list