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/Cookbook.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/dbicdump <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.


_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk

Reply via email to