[Catalyst-dev] [Catalyst] Major (for me) problem fixed!

Jonathan Rockway jon at jrock.us
Mon Jul 31 22:34:35 CEST 2006


For the time being, can we do this diff in Catalyst::Utils:

+     die "Problem loading $class: $error" if $error;
-     die $error if $error
(near line 257)

> Warning: Use of "require" without parentheses is ambiguous at (eval
> 124) line 1.
> It looks like there was a problem loading Blog::Controller::.#Feeds:
> syntax error at (eval 124) line 2, at EOF
> Compilation failed in require at script/blog_server.pl line 52.

is better than:

> Warning: Use of "require" without parentheses is ambiguous at (eval
> 124) line 1.
> syntax error at (eval 124) line

At least the end user can see "wait, there's no controller called
.#Feeds!" without having to use the perl debugger.  The whole "require
without parentheses" confused the heck out of me, especially because if
you go up the call stack to where myapp_server.pl sees the error, it's a
require statement!

It might be even better to catch this exception and print an informative
message somewhere higher up, although it looks like there's enough
information here to generate an acceptable error message.

Regards,
Jonathan Rockway





More information about the Catalyst-dev mailing list