[Catalyst] some basic Catalyst theory questions

Perrin Harkins perrin at elem.com
Tue Jun 7 00:46:36 CEST 2005

On Tue, 2005-06-07 at 00:15 +0200, Sebastian Riedel wrote:
> It's up to you how to handle them...
> But unhandled exceptions are collected and presented on the sweet  
> debug screen in -Debug mode.

If it always catches my exceptions in an eval{} block, how does it know
if I handled them or not?  Do I have to check some return code after
every forward() call?  That would be a bit backwards.  Is there an
example of exception handling somewhere?

> No wait, all uri's you define are relative to the applications root!
>      <Location /exec/obidos/bar>
> And it would be all relative to that...

Oh good, that makes a lot more sense.

> No wait, you asked for $c->req->params which are the parameters.
> You want arguments $c->req->args.

I don't think I do.  I mean handling for URLs like /foo?key=value where
I want to read the value of "key".  What are args?  Is this some way to
pass additional arguments in a forward?  I don't recall seeing it in the

> You can access them via @{ $c->req->args } or directly in your actions
>      sub action : Local {
>          my ( $self, $c, $arg1, $arg2, $arg3... ) = @_;
>      }
> We try to give you as much syntactic sugar as possible with perl5,  
> but the perl6 port i'm working on will be much sweeter!!! ;)

I don't want to sound too harsh, but frankly, if you want Catalyst to
succeed I think you should forget about Perl6 and work on the docs.
It's not very obvious how all of these things are supposed to work, and
code generation helpers only go so far.

- Perrin

More information about the Catalyst mailing list