FAQ
Dear List.

I am writing a job queuing system in catalyst. I have found an example of
a job queuing examples that uses TheSchwartz and catalyst through
Catalyst::Model::Adaptor. Currently it uses Sqlite, I need to use MySQL,
for me to do this I need to create TheSchwartz with augments like


use parent "Catalyst::Model::Adaptor";

__PACKAGE__->config( class => "TheSchwartz",
args => { verbose => 1,

databases => [{
'dsn' => 'dbi:mysql:Schwart',
'user' => 'db_user',
?pass? => ?password?
}
]
}
);


I just get the following when I run the server:

Couldn't instantiate component "MyApp::Model::TheSchwartz", "unknown
options HASH(0x3a71a30) at
/usr/local/share/perl/5.8.8/Catalyst/Model/Adaptor/Base.pm line
27"Compilation failed in require at ./script/myapp_server.pl line 66.

Does anyone know of how I can fix this?

Once I get this working I will move it to prepare_arguments so that I can
get details out of the config file.

Regards,

Gordon

Search Discussions

  • Ashley Pond V at Aug 7, 2010 at 4:41 pm

    On Sat, Aug 7, 2010 at 9:26 AM, wrote:
    I am writing a job queuing system in catalyst. ?I have found an example of
    a job queuing examples that uses TheSchwartz and catalyst through
    Catalyst::Model::Adaptor. ?Currently it uses Sqlite, ?I need to use MySQL,
    for me to do this I need to create TheSchwartz with augments like
    I haven't played with your sample at all, or looked at the stuff much
    in a year, but MySQL should actually be easier than SQLite and you
    dropped the mange_args sub which is probably relevant. Try adding it?

    sub mangle_arguments { %{$_[1]} }

    http://sedition.com/a/2742

    -Ashley

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcatalyst @
categoriescatalyst, perl
postedAug 7, '10 at 4:26p
activeAug 7, '10 at 4:41p
posts2
users2
websitecatalystframework.org
irc#catalyst

2 users in discussion

Gordon: 1 post Ashley Pond V: 1 post

People

Translate

site design / logo © 2022 Grokbase