FAQ
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) = @_;
...
}

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::__ANON__::SERIAL::5=HASH(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=HASH(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::MyController',
'formbuilder') called at
/Library/Perl/5.8.8/Catalyst/Controller/FormBuilder.pm line 40

Catalyst::Controller::FormBuilder::__setup('MyApp::Controller::MyController=HASH(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=HASH(0xc0d8d8)')
called at /Library/Perl/5.8.8/Catalyst/Restarter.pm line 101

Catalyst::Restarter::_handle_events('Catalyst::Restarter::Forking=HASH(0xc0d8d8)',
'File::ChangeNotify::Event=HASH(0xc85c3c)') called at
/Library/Perl/5.8.8/Catalyst/Restarter.pm line 79

Catalyst::Restarter::_restart_on_changes('Catalyst::Restarter::Forking=HASH(0xc0d8d8)')
called at /Library/Perl/5.8.8/Catalyst/Restarter.pm line 103

Catalyst::Restarter::_handle_events('Catalyst::Restarter::Forking=HASH(0xc0d8d8)',
'File::ChangeNotify::Event=HASH(0xc85ab0)') called at
/Library/Perl/5.8.8/Catalyst/Restarter.pm line 79

Catalyst::Restarter::_restart_on_changes('Catalyst::Restarter::Forking=HASH(0xc0d8d8)')
called at /Library/Perl/5.8.8/Catalyst/Restarter.pm line 103

Catalyst::Restarter::_handle_events('Catalyst::Restarter::Forking=HASH(0xc0d8d8)',
'File::ChangeNotify::Event=HASH(0xc859f0)') called at
/Library/Perl/5.8.8/Catalyst/Restarter.pm line 79

Catalyst::Restarter::_restart_on_changes('Catalyst::Restarter::Forking=HASH(0xc0d8d8)')
called at /Library/Perl/5.8.8/Catalyst/Restarter.pm line 72

Catalyst::Restarter::run_and_watch('Catalyst::Restarter::Forking=HASH(0xc0d8d8)')
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/d859664c/attachment.htm

Search Discussions

  • Tomas Doran at Jul 26, 2009 at 8:05 pm

    On 26 Jul 2009, at 19:09, Gavin Aiken wrote:
    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::__ANON__::SERIAL::5=HASH(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=HASH(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::MyController', 'formbuilder') called at /
    Library/Perl/5.8.8/Catalyst/Controller/FormBuilder.pm line 40
    This isn't an error, it's a warning.

    The solution is to upgrade MooseX::Emulate::Class::Accessor::Fast

    Cheers
    t0m
  • Gavin Aiken at Jul 26, 2009 at 8:20 pm

    From: Tomas Doran <bobtfish@bobtfish.net>
    On 26 Jul 2009, at 19:09, Gavin Aiken wrote:
    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::__ANON__::SERIAL::5=HASH(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=HASH(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::MyController', 'formbuilder') called at /
    Library/Perl/5.8.8/Catalyst/Controller/FormBuilder.pm line 40
    This isn't an error, it's a warning.

    The solution is to upgrade MooseX::Emulate::Class::Accessor::Fast
    Thanks Tom, that fixed the warning.

    cheers, Gavin

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcatalyst @
categoriescatalyst, perl
postedJul 26, '09 at 6:09p
activeJul 26, '09 at 8:20p
posts3
users2
websitecatalystframework.org
irc#catalyst

2 users in discussion

Gavin Aiken: 2 posts Tomas Doran: 1 post

People

Translate

site design / logo © 2022 Grokbase