[Catalyst] nothing printed

Octavian Rasnita orasnita at fcc.ro
Sun Mar 19 16:11:45 CET 2006


Hi,

From: "Matt S Trout" <dbix-class at trout.me.uk>
>
> If you fire the application up from a shell window you should be able to
see
> what's happening via the debug log it produces.
>

I have seen that it was printed nothing because the greet.tt sample was
wrong, because it doesn't contain </title>. Now it prints the form, but it
doesn't print the text "Please fill in a name" in that form.

Now it "works" pretty strange. If I fill the form then submit it, sometimes
it doesn't submit even if pressing the "submit" button for more times.
Sometimes it gets submitted, but the result is "page not found".

I have ran the program tutorial_test.pl in order to see how it works, and I
have also analysed the results of tutorial_server.pl, but I couldn't see
what is wrong.

First, the most simple problem, I don't know why, the text "Please fill in a
name" is not printed the first time when the form is displayed.

I guess something is not ok with the following piece of code from the
subroutine

sub greet : Local

from

package tutorial::Controller::Users;

Here it is. What could be wrong?

Thank you.

if ($c->req->method eq 'POST') {
if(!$name) {
$c->stash->{message} = 'Please fill in a name!';
}
else {
$c->stash->{message} = "Hello $name!";
}
}

Teddy




More information about the Catalyst mailing list