Can't locate object method "search" via package "Sakila"

15 views
Skip to first unread message

Terrence Brannon

unread,
May 5, 2010, 11:30:20 AM5/5/10
to dbix-...@googlegroups.com
I created a [static schema
file](http://github.com/metaperl/dbix-cookbook/blob/master/lib/DBIx/Cookbook/Skinny/Sakila/Schema.pm)

by use of my [skinny_loader
script](http://github.com/metaperl/dbix-cookbook/blob/master/scripts/skinny_loader)


I also created a [main model
file](http://github.com/metaperl/dbix-cookbook/blob/master/lib/DBIx/Cookbook/Skinny/Sakila.pm)

but I am not sure whether it should say:

use DBIx::Skinny::Schema setup =>

or

use Sakila::Schema setup =>


My [command script](http://github.com/metaperl/dbix-cookbook/blob/master/scripts/skinny_cmd)

attempts to load the main model file (the Sakila package) and use the
->search method but it fails with the error

metaperl@locohost:~/prg/DBIx-Cookbook$ ./scripts/skinny_cmd fetch_all
Can't locate object method "search" via package "Sakila" at
/home/metaperl/prg/DBIx-Cookbook/lib/DBIx/Cookbook/Skinny/Command/fetch_all.pm
line 18.

Keiji, Yoshimi

unread,
May 5, 2010, 5:08:24 PM5/5/10
to DBIx::Skinny
I think it should write

use DBIx::Skinny setup => +{
}

not "DBIx::SkinnySchema", but "DBIx::Skinny".

Sakila::Schema loaded automatically by DBIx::Skinny.

On 5月6日, 午前12:30, Terrence Brannon <scheme...@gmail.com> wrote:
> I created a [static schema
> file](http://github.com/metaperl/dbix-cookbook/blob/master/lib/DBIx/Cookboo...)
>
> by use of my [skinny_loader
> script](http://github.com/metaperl/dbix-cookbook/blob/master/scripts/skinny_l...)
>
> I also created a [main model
> file](http://github.com/metaperl/dbix-cookbook/blob/master/lib/DBIx/Cookboo...)
Reply all
Reply to author
Forward
0 new messages