Hi,
Error: Can't locate object method "form" via package
I have been working my way through the sample chapter in the Catalyst
book (very topical today) and have hit an error.
Here's the code I have
use strict;
use warnings;
use base qw(Catalyst::Controller::FormBuilder
Catalyst::Controller::BindLex);
...
sub edit : Local Form {
my ($self, $c) = @_;
if ($c->form->submitted && $c->form->validate) {
$c->stash->{message} = 'Thanks for submitting the form';
}
}
It looked like 'form' would become a method of $c once it was brought
in with use base and : Local Form but perhaps not!
I wanted to verify that the error wasn't due to a problem with the
config file. There is not reference to it in the debug page that gets
generated but the server does say "Found form config...path"
Can anyone advise me on how to debug this?
_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/