[Catalyst] Pre-Moose version of Catalyst and all plugins?

Matt S Trout mst at shadowcat.co.uk
Wed Apr 28 14:48:42 GMT 2010

On Mon, Apr 26, 2010 at 04:09:48PM -0400, Kee Hinckley wrote:
> I'm trying to get some old code running in a hurry. Unfortunately Moose has completely fouled things up.

No it hasn't. Please throw away your preconceptions and report the actual

> First it broke my use of Error.pm (conflict with "with"). Fortunately I didn't use "with", and could just comment it out. But what I did have was my own Error subclass that was the Catalyst Exception class.

You mean you added 'use Moose' somewhere and thereby found you had a 'with'
sub imported. That happens when you add import lines.

You can ask Moose to not import with, you can ask Error to not import with,
or you can ask Moose to import with under a different name.

But I don't even understand why you added 'use Moose' to your own classes at
all since that's in no way required to use Catalyst 5.80 - we spent a lot of
time making sure old code Just Worked for every application we could get at.
>     $Catalyst::Exception::CATALYST_EXCEPTION_CLASS = 'Error::Throws';
> };

is the BEGIN block -before- the 'use Catalyst' line?
> I have no idea how to even get started on making that work. I made Error a Moose inherited module from Catalyst::Exception (which is the wrong level, but it got rid of:

I have no idea how it doesn't work yet because you didn't tell us what didn't

Maybe you could elaborate a little?

> Not inlining 'new' for Catalyst::Exception since it is not inheriting the default Moose::Object::new
> If you are certain you don't need to inline your constructor, specify inline_constructor => 0 in your call to Catalyst::Exception->meta->make_immutable

Which is a warning, not an error - though it's a little annoying. Let's fix
everything else and get to that one last?

> But then that left me with
> Recursive inheritance detected while looking for method 'isa' in package 'Catalyst::Exception' at /usr/local/lib/perl/5.8.8/Class/MOP/Class.pm line 570.

I can't find Error::Throws on CPAN.

Is it a private package?

If so, please show us what it contains - we're not really going to be able
to debug it otherwise.

> If someone has a quick way of telling me how to make my code compatible with Catalyst::Exception that would be great, but I'm worried that I'm going to hit lots of other things like this. In particular, I'm also using Embperl as a Catalyst interpreter instead of TT, so I may hit Moose again there. It might be easier for me to just take a step back in time and get old versoins:

I have no idea what you mean by "hit Moose" and I have no idea how Moose
and Embperl are remotely related. Could you elaborate please?

> Any suggestion on a solution that isn't going to take me days?

Not until you tell us what the actual problems are, no, sorry.

        Matt S Trout         Catalyst and DBIx::Class consultancy with a clue
     Technical Director      and a commit bit: http://shadowcat.co.uk/catalyst/
 Shadowcat Systems Limited
  mst (@) shadowcat.co.uk        http://shadowcat.co.uk/blog/matt-s-trout/

More information about the Catalyst mailing list