[Catalyst] NEXT vs SUPER in the catalyst handle_request cycle

Matt S Trout dbix-class at trout.me.uk
Tue Nov 21 23:22:16 GMT 2006


Michael Reece wrote:
> retracing my steps, i see that NEXT works for all of the methods i 
> listed except 'forward'.
 >
> but if i s/NEXT/SUPER/, then it works as expected.

Yep, that's because NEXT isn't re-entrant, and Catalyst's dispatch process 
involves nested forwards. This is why we suggested C3 which doesn't suffer 
from this problem.

>> Then again, I never use the debugger, I'm of the "you can have 
>> (printf|warn) when you pry it from my cold, dead fingers" debugging 
>> school :)
> 
> that it my usual method and works great for in-house code, but copying 
> CPAN modules into my personal lib directories so i can fill them with 
> warn statements has its own annoyances, so sometimes i resort to the 
> debugger using the guidance of Catalyst::Manual::Tutorial::Debugging.

I don't tend to find

mkdir lib/Some/Module; cp `perldoc -l Some::Module::Name` lib/Some/Module/

too much of a problem.

Then again, I always run with -everything- installed in ~/perl for development 
at which point it's just

chmod 644 `perldoc -l Some::Module::Name`
vi `perldoc -l Some::Module::Name`

which I've always found quicker than the debugger :)



More information about the Catalyst mailing list