[Catalyst] Re: [ANNOUNCE] Re: Catalyst Runtime 5.80001 - MooseX::MethodAttributes::Inheritable 0.06

Octavian Râsnita orasnita at gmail.com
Mon Apr 20 08:53:55 GMT 2009


From: "Tomas Doran" <bobtfish at bobtfish.net>
> Octavian Râsnita wrote:
>> I want to report something that might be a packaging bug, or maybe you 
>> can tell me what could be the problem...
>>
>> This version requires MooseX-MethodAttributes-0.05.tar.gz and I couldn't 
>> install this module under Windows using CPAN.
>
> <snip>
>
> Hmm. If I remember correctly, I built that distribution on my new mac 
> mini, but I may not have done. Can I build a couple of demo dists on my 
> machines and send them to you off list so we can work out what in my setup 
> might be causing issues for you?

Oh yes, please do it. I've downloaded MooseX-MethodAttributes-0.06.tar.gz 
and tried to unarchive it, but this package also tried to put all the files 
and directories in the same directory (and also tried to overwrite 
Inheritable.pm because there are 2 files with this name in the 
distribution).

It is strange because it unarchives fine under Linux and also under Windows 
using 7zip, but the cpan command line can't install it well under Windows.

> I've just built an updated distribution of MX::MethodAttributes (0.06) on 
> a different system and shipped it to CPAN.
>
> This release also contains a bug fix which could be relevant to some 
> applications.
>
> With 0.05, the following code would fail to correctly register any actions 
> in your package:
>
> package MyApp::Controller::Foo;
> use base qw/Catalyst::Controller/;
> use Moose;
>
> however the recommended:
>
> package MyApp::Controller::Foo;
> use Moose;
> BEGIN { extends 'Catalyst::Controller' }
>
> was unaffected, as were classes which did not use Moose.
>
> This issue has been corrected for any users with applications using Moose 
> with the previous pattern.
>
> Cheers
> t0m

I found a very strange thing that I can't understand...

I made a new app using

catalyst T5

In this app I added 2 controllers:

package T5::Controller::BlaBla;
use strict;
use warnings;
use base 'TranzactiiBursiere::Controller::Base';
1;

package T5::Controller::Base;
use strict;
use warnings;
use base 'Catalyst::Controller';
1;

If I start the development server using
perl script/t5_server.pl
the server starts fine.

But if I rename the BlaBla.pm controller to Ana.pm and also edit it to be

package T5::Controller::Ana;

the server doesn't start, but gives the error below.

It is strange because it is a new app that doesn't have other dependencies 
and it shouldn't have any conflict just because I changed the controller 
name. I've tested with other names for that controller, and some of them 
work and some of them don't.

Here is the error given when using
perl script/t5_server.pl

E:\web\T5>perl script/t5_server.pl
Metaclass for Class::MOP::Class for T5::Controller::Base cannot support 
register
_actions. at E:/perl510/site/lib/Catalyst/Controller.pm line 180
        Catalyst::Controller::get_action_methods('T5::Controller::Base=HASH(0x40
a97bc)') called at E:/perl510/site/lib/Catalyst/Controller.pm line 189
        Catalyst::Controller::register_actions('T5::Controller::Base=HASH(0x40a9
7bc)', 'T5') called at E:/perl510/site/lib/Catalyst/Dispatcher.pm line 596
        Catalyst::Dispatcher::setup_actions('Catalyst::Dispatcher=HASH(0x3836924
)', 'T5') called at E:/perl510/site/lib/Catalyst.pm line 2096
        Catalyst::setup_actions('T5') called at 
E:/perl510/site/lib/Catalyst.pm
line 1084
        Catalyst::setup('T5') called at E:/web/T5/script/../lib/T5.pm line 
34
        require T5.pm called at script/t5_server.pl line 55
Compilation failed in require at script/t5_server.pl line 55.
E:\web\T5>

                  Octavian 




More information about the Catalyst mailing list