Re: [Catalyst] TheSchwartz - Catalyst::Model::Adaptor

2010-08-07 Thread Ashley Pond V
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

___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


[Catalyst] TheSchwartz - Catalyst::Model::Adaptor

2010-08-07 Thread gordon
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



___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/