[Catalyst] Can't use string ("AutoCommit") as a HASH ref while
"strict refs" in use
Dmitri Pissarenko
dmitri.pissarenko at gmail.com
Tue May 1 10:27:01 GMT 2007
Helo, Lee!
Thanks for your answer!
On 5/1/07, Lee Standen <nom at standen.id.au> wrote:
> Sounds like you've tried to use additional options in your connect
> details, and forgot to put them into a hash.
>
> AutoCommit => 1
>
> Should be:
>
> { AutoCommit => 1 }
>
> Give that a go?
I changed MyAppDB.pm so that now it looks like shown below.
CODE FRAGMENT (START)
package MyApp::Model::MyAppDB;
use strict;
use base 'Catalyst::Model::DBIC::Schema';
__PACKAGE__->config(
schema_class => 'MyAppDB',
connect_info => [
'dbi:SQLite:myapp.db',
'\'\'',
'\'\'',
'\'{',
{AutoCommit => 1},
'=',
'}\'',
],
);
=head1 NAME
MyApp::Model::MyAppDB - Catalyst DBIC Schema Model
=head1 SYNOPSIS
CODE FRAGMENT (END)
Now when I start myapp_server.pl and browse to
http://localhost:3000/books/list, the browser goes to "Loading" state
and in the command line window I see following output:
OUTPUT START
DBI->connect using 'old-style' syntax is deprecated and will be an error in futu
re versions at D:/Perl/site/lib/DBIx/Class/Storage/DBI.pm line 371
DBI->connect using 'old-style' syntax is deprecated and will be an error in futu
re versions at D:/Perl/site/lib/DBIx/Class/Storage/DBI.pm line 371
DBI->connect using 'old-style' syntax is deprecated and will be an error in futu
re versions at D:/Perl/site/lib/DBIx/Class/Storage/DBI.pm line 371
DBI->connect using 'old-style' syntax is deprecated and will be an error in futu
re versions at D:/Perl/site/lib/DBIx/Class/Storage/DBI.pm line 371
DBI->connect using 'old-style' syntax is deprecated and will be an error in futu
re versions at D:/Perl/site/lib/DBIx/Class/Storage/DBI.pm line 371
DBI->connect using 'old-style' syntax is deprecated and will be an error in futu
re versions at D:/Perl/site/lib/DBIx/Class/Storage/DBI.pm line 371
DBI->connect using 'old-style' syntax is deprecated and will be an error in futu
re versions at D:/Perl/site/lib/DBIx/Class/Storage/DBI.pm line 371
DBI->connect using 'old-style' syntax is deprecated and will be an error in futu
re versions at D:/Perl/site/lib/DBIx/Class/Storage/DBI.pm line 371
DBI->connect using 'old-style' syntax is deprecated and will be an error in futu
re versions at D:/Perl/site/lib/DBIx/Class/Storage/DBI.pm line 371
DBI->connect using 'old-style' syntax is deprecated and will be an error in futu
re versions at D:/Perl/site/lib/DBIx/Class/Storage/DBI.pm line 371
DBI->connect using 'old-style' syntax is deprecated and will be an error in futu
re versions at D:/Perl/site/lib/DBIx/Class/Storage/DBI.pm line 371
Terminating on signal SIGINT(2)
OUTPUT END
The database is very small, so I assume that some error happens
(inifinite loop?).
How can I solve this problem?
TIA
Dmitri
More information about the Catalyst
mailing list