[Dbix-class] getting error; DBIx::Class not finding Schema created
with schema loader
neil.lunn
neil at mylunn.id.au
Tue Aug 30 08:27:18 GMT 2011
On 30/08/2011 2:23 PM, Rajeev Prasad wrote:
> I tried mentioning the path where schema was created, but i am getting =
> error: can someone hel resolve? thx. Rajeev
> use Mysqltestdb::Schema;
> Mysqltestdb::Schema->dump_to_dir('../testdb/');
>
Whilst it is valid and has been mentioned that path to your class needs =
to be included in perl's @INC ( see 'use lib' )
I still feel some need to mention that what you appear to be doing here =
is call methods on a Class you are generating as the terms are calling a =
method of Schema::Loader and then a method from Schema on the following =
line.
I would suggest that what you are actually trying to do can be obtained =
from reading the good manual, right about here:
http://search.cpan.org/~abraxxa/DBIx-Class-0.08195/lib/DBIx/Class/Manual/Co=
okbook.pod#SQL =
<http://search.cpan.org/%7Eabraxxa/DBIx-Class-0.08195/lib/DBIx/Class/Manual=
/Cookbook.pod#SQL>
And then probably determining that what you actually want (probably =
should be doing) to do is look at the usage of dbicdump =
(http://search.cpan.org/~rkitover/DBIx-Class-Schema-Loader-0.07010/script/d=
bicdump =
<http://search.cpan.org/%7Erkitover/DBIx-Class-Schema-Loader-0.07010/script=
/dbicdump>) =
after getting from understanding from the documentation above.
Neil
> Can't locate Mysqltestdb/Schema.pm in @INC (@INC contains: /etc/perl =
> /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 =
> /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 =
> /usr/local/lib/site_perl .) at ./insertdb.pl line 6.
> BEGIN failed--compilation aborted at ./insertdb.pl line 6.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20110830/ec6=
b97a6/attachment.htm
More information about the DBIx-Class
mailing list