[Catalyst] FormBuilder - Can't locate object method "form" via package

Dermot paikkos at googlemail.com
Mon Feb 25 18:35:35 GMT 2008


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) =3D @_;
 if ($c->form->submitted && $c->form->validate) {
   $c->stash->{message} =3D '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?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20080225/094ed=
065/attachment.htm


More information about the Catalyst mailing list