[Catalyst] latest catalyst/moose/formbuilder - error: Attribute
(formbuilder) of
class MyApp::Controller::MyController has no associated methods
Gavin Aiken
gavin at aiken.org.uk
Sun Jul 26 18:09:36 GMT 2009
Hi All,
I just upgraded to the latest Catalyst & Moose modules out of CPAN and am
now getting a new error whenever starting my app, for any of my controllers
which are using formbuilder. eg
package MyApp::Controller::MyController;
use base 'Catalyst::Controller::FormBuilder';
sub edit : Local Form {
my ($self, $c) =3D @_;
...
}
1;
The errors look like this:
Attribute (formbuilder) of class MyApp::Controller::MyController has no
associated methods (did you mean to provide an "is" argument?)
at /Library/Perl/5.8.8/Moose/Meta/Attribute.pm line 565
Moose::Meta::Attribute::_check_associated_methods('Class::MOP::Class::__ANO=
N__::SERIAL::5=3DHASH(0x4d9a434)')
called at /Library/Perl/5.8.8/Moose/Meta/Class.pm line 253
Moose::Meta::Class::add_attribute('Class::MOP::Class::__ANON__::SERIAL::1=
=3DHASH(0x4d9e71c)',
'formbuilder', 'traits', 'ARRAY(0x4d9a35c)') called at
/Library/Perl/5.8.8/MooseX/Emulate/Class/Accessor/Fast.pm line 266
MooseX::Emulate::Class::Accessor::Fast::make_accessor('MyApp::Controller::M=
yController',
'formbuilder') called at
/Library/Perl/5.8.8/Catalyst/Controller/FormBuilder.pm line 40
Catalyst::Controller::FormBuilder::__setup('MyApp::Controller::MyController=
=3DHASH(0x4d9a080)')
called at /Library/Perl/5.8.8/Catalyst/Controller/FormBuilder.pm line 13
Catalyst::Controller::FormBuilder::new('MyApp::Controller::MyController',
'MyApp', 'HASH(0x4d9a5e4)') called at
/Library/Perl/5.8.8/Catalyst/Component.pm line 100
Catalyst::Component::COMPONENT('MyApp::Controller::MyController',
'MyApp', 'HASH(0x4d9a5e4)') called at /Library/Perl/5.8.8/Catalyst.pm line
2216
eval {...} called at /Library/Perl/5.8.8/Catalyst.pm line 2216
Catalyst::setup_component('MyApp',
'MyApp::Controller::MyController') called at /Library/Perl/5.8.8/Catalyst.pm
line 2170
Catalyst::setup_components('MyApp') called at
/Library/Perl/5.8.8/Catalyst.pm line 1085
Catalyst::setup('MyApp') called at
/Users/Shared/MyApp/workdir/MyApp-repo/MyApp/script/../lib/MyApp.pm line 120
require MyApp.pm called at MyApp/script/MyApp_server.pl line 66
main::__ANON__() called at
/Library/Perl/5.8.8/Catalyst/Restarter/Forking.pm line 20
Catalyst::Restarter::Forking::_fork_and_start('Catalyst::Restarter::Forking=
=3DHASH(0xc0d8d8)')
called at /Library/Perl/5.8.8/Catalyst/Restarter.pm line 101
Catalyst::Restarter::_handle_events('Catalyst::Restarter::Forking=3DHASH(0x=
c0d8d8)',
'File::ChangeNotify::Event=3DHASH(0xc85c3c)') called at
/Library/Perl/5.8.8/Catalyst/Restarter.pm line 79
Catalyst::Restarter::_restart_on_changes('Catalyst::Restarter::Forking=3DHA=
SH(0xc0d8d8)')
called at /Library/Perl/5.8.8/Catalyst/Restarter.pm line 103
Catalyst::Restarter::_handle_events('Catalyst::Restarter::Forking=3DHASH(0x=
c0d8d8)',
'File::ChangeNotify::Event=3DHASH(0xc85ab0)') called at
/Library/Perl/5.8.8/Catalyst/Restarter.pm line 79
Catalyst::Restarter::_restart_on_changes('Catalyst::Restarter::Forking=3DHA=
SH(0xc0d8d8)')
called at /Library/Perl/5.8.8/Catalyst/Restarter.pm line 103
Catalyst::Restarter::_handle_events('Catalyst::Restarter::Forking=3DHASH(0x=
c0d8d8)',
'File::ChangeNotify::Event=3DHASH(0xc859f0)') called at
/Library/Perl/5.8.8/Catalyst/Restarter.pm line 79
Catalyst::Restarter::_restart_on_changes('Catalyst::Restarter::Forking=3DHA=
SH(0xc0d8d8)')
called at /Library/Perl/5.8.8/Catalyst/Restarter.pm line 72
Catalyst::Restarter::run_and_watch('Catalyst::Restarter::Forking=3DHASH(0xc=
0d8d8)')
called at MyApp/script/MyApp_server.pl line 104
I've been using Catalyst for a while but am new to Moose so this error means
nothing to me, so sorry if it's blindingly obvious what's going on here. Can
anyone tell me what I need to do to fix the error?
Thanks!
-- =
Gavin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20090726/d8596=
64c/attachment.htm
More information about the Catalyst
mailing list