attribute dbd does not exist. does it connected?

3 views
Skip to first unread message

Terrence Brannon

unread,
May 6, 2010, 10:09:35 AM5/6/10
to dbix-skinny
I implemented the suggestions in the earlier thread
(http://groups.google.com/group/dbix-skinny/browse_thread/thread/2993f65a3ec233cc)
to use DBIx::Skinny setup in Sakila.pm
(http://github.com/metaperl/dbix-cookbook/blob/master/lib/DBIx/Cookbook/Skinny/Sakila.pm)
but when I invoke scripts/skinny_cmd fetch_all I get a complaint about
'dbd' .... I wasnt aware that Skinny expected 'dbd' as a separate
parameter, as you can see from the dump of info passed to setup
(http://github.com/metaperl/dbix-cookbook/blob/master/lib/DBIx/Cookbook/Skinny/Sakila.pm#L15)
only 'dsn', 'username' and 'password' are passed, just like in the
SYNOPSIS (http://search.cpan.org/dist/DBIx-Skinny/lib/DBIx/Skinny.pm#SYNOPSIS)

metaperl@locohost:~/prg/DBIx-Cookbook$ source config.bashrc
metaperl@locohost:~/prg/DBIx-Cookbook$ ./scripts/skinny_cmd fetch_all
setup: $VAR1 = {
'password' => 'shootout1',
'dsn' => 'dbi:mysql:database=sakila;host=localhost;port=3306',
'username' => 'shootout'
};
attribute dbd does not exist. does it connected? attribute: $VAR1 = {
'profile' => 0,
'profiler' => bless( {
'query_log' => []
}, 'DBIx::Skinny::Profiler' ),
'klass' => 'Sakila',
'schema' => 'Sakila::Schema',
'row_class_map' => {},
'username' => undef,
'on_connect_do' => undef,
'password' => undef,
'connect_options' => undef,
'dsn' => undef,
'active_transaction' => 0,
'check_schema' => 1,
'dbh' => undef,
'dbd' => undef
};
at /home/metaperl/prg/DBIx-Cookbook/lib/DBIx/Cookbook/Skinny/Command/fetch_all.pm
line 18

Terrence Brannon

unread,
May 6, 2010, 11:03:27 AM5/6/10
to dbix-skinny
Ok, i fixed it:

http://github.com/metaperl/dbix-cookbook/blob/master/lib/DBIx/Cookbook/Skinny/Sakila.pm#L15

The setup hashref was actually empty because of how use works in a BEGIN block

atsushi kobayashi

unread,
May 6, 2010, 11:10:14 AM5/6/10
to dbix-...@googlegroups.com
hi.

I'm glad you found the cause.


2010/5/7 Terrence Brannon <sche...@gmail.com>:
--
Atsushi Kobayashi
Reply all
Reply to author
Forward
0 new messages