[Catalyst] Having problem with Catalyst::Controller::FormBuilder module with Catalyst 5.8

Cory Hollingsworth cory at users.sourceforge.net
Mon Nov 22 20:04:26 GMT 2010


> On 22 Nov 2010, at 16:41, Cory Hollingsworth wrote:
>> Here is a very simple example of a Root.pm code which illustrates my
problem:
>> <Start Perl Code>
>> package lookupreset::Controller::Root;
>> use base 'Catalyst::Controller::FormBuilder';
>> use Moose;
>> use namespace::autoclean;
>> BEGIN { extends 'Catalyst::Controller' }
> You're using one base class, then later replacing it with another... You
should just be able to say:
>> package lookupreset::Controller::Root;
>> use base 'Catalyst::Controller::FormBuilder';
> as you used to - you should not need to change all of your app to use
Moose etc.
> Why doesn't just using Catalyst 5.8 with no changes to your app work for
you?
> Cheers
> t0m

This is an example of duplicated syntax in Perl isn't it?  Two lines that
look different, but essentially do the same thing.  Frankly the BEGIN line
was boiler plate, I didn't realize it was essentially doing the same as a
"use base".

My old applications should be able to work in Catalyst 5.8 w/o
modification?  I had come to the conclusion that I needed to re-import the
base logic into a freshly created Catalyst 5.8 project when I ended up
with Moose errors on my first attempt this summer.  I had put it aside
until now as it wasn't a priority back then.

I have just tried it again and I have succeeded in getting the simpler of
the two applications to work w/o modification with Catalyst 5.8.  Woohoo! 
Frankly I should have done that before I posted a message considering all
the patches that had been applied between now and this summer.  Sigh. 
Another sign of creeping senility.

Thanks t0m for pushing me in a sensible direction.  For some reason I was
making things far harder than they should have been.




More information about the Catalyst mailing list