[Catalyst] Re: Warnings when upgrading Catalyst

George Nistorica george at depechemode.ro
Mon Jun 29 10:40:54 GMT 2009


Tomas Doran wrote:
> 
> On 26 Jun 2009, at 21:41, George Nistorica wrote:
> 
>> Hi,
>>
>> (my reply might be garbled, sorry)
> 
> Makes perfect sense here.

my email was garbled as I wasn't subscribed to the list when the
original emails have been sent :P

> 
>> I've got the same problem generated from a Controller that uses
>> Controller::REST as a base class.
>>
>> And the warning being generated when I ->forward() to another Controller
>> (doing some data validation).
> 
> Hmm, I can't replicate this in a simple case, from that description..

Here: http://www.depechemode.ro/MyApp-0.1.tar.gz
a simple TestApp using Catalyst::Controller::REST to replicate the
problem, having Catalyst 5.80005 installed.

Please have a look at the included README.


> 
> 
> 
>> I've got around this warning by editing Catalyst.pm and adding this
>> piece of code
>>
>>         if (   not exists $c->counter->{"$parent"}
>>             or not defined $c->counter->{"$parent"} )
>>         {
>>             $c->counter->{"$parent"} = 0;
>>         }
>>
>> right before the undefined value is used:
>>
>>         $c->stats->profile(
>>             begin  => $action,
>>             parent => "$parent" . $c->counter->{"$parent"},
>>             uid    => $uid,
>>         );
>>
>> that worked for me, and now the debug output shows the profiling for the
>> methods I ->forward() to as well:
>>
>> the methods from another Controller to which I forward to, where missing
>> from the profiling output, getting that warning instead.
> 
> 
> That looks like a prefect fix to me, but I'd _really_ like to get to the
> bottom of what is causing the issue, so that we can write tests of some
> form, and also because this could be hiding a bug at another layer which
> should be fixed :/

that makes sense, what I did was just to shut off the warning, didn't
had the guts to look forward to search for the root of the problem.

> 
> Are you forwarding to a private path string, or an action object?
> 
> I guess extracting _just_ the structure of your controllers (without any
> of the code, just the sub/attribute declerations), and ensuring your
> doing the appropriate forwards that your app would be doing would
> replicate the issue in a TestApp.
> 
> Don't suppose you could attempt that, so that we can find the root
> cause, and get this fix integrated?
> 
> Cheers
> t0m
> 
> 
> _______________________________________________
> List: Catalyst at lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/


-- 
#!/usr/bin/perl -w ###################
use strict;###########################

( $_ = qq{0912 3c1217 709073043p2it//,
'"70kc1H 270P 70htonA t3uJ" tni7p'8;})
=~    tr/42179038/(larves)/;eval#uate;

######################################



More information about the Catalyst mailing list