Subject: [Dbix-class] Re: using as normal perl module To

Rajeev Prasad rp.neuli at yahoo.com
Mon Aug 1 19:12:01 GMT 2011


i found the mistake, it was incorrect database name in the dbi.. line

but i am still not sure why it did not return ANYTHING (err or otherwise) o=
n first run.


Also, after my first successful run: I now have all the database and table =
schema in my desired location.is this normal? for every table i got:


DBIx::Class::Schema::Loader::make_schema_at(): <table> has no primary key a=
t ./create-schema-script.pl line 8




________________________________
From: Rajeev Prasad <rp.neuli at yahoo.com>
To: DBIx::Class user and developer list <dbix-class at lists.scsys.co.uk>
Sent: Monday, August 1, 2011 2:01 PM
Subject: Re: Subject: [Dbix-class] Re: using as normal perl module To


for using DBIx, I am not sure what i need to do and what i can do (so new i=
 am to this).



i have found this page, it is a wonderful resource to me (thanks to author)=
, it has demystified quite a few things about how to start. It is saying ve=
ry clearly that:

"To use DBIC you first need to setup your Schema - =

the logical model of the database tables, views and relationships....."


so i tried:

i have this mysql database with few tables in it:

according to author, after i run this script i should have a directory stru=
cture in my current (or specified) folder, for all my tables and database. =
When i run the following code, I get no error, but no output either. can an=
yone help plz?


#!/usr/bin/perl

use strict;
use warnings;

use DBIx::Class::Schema::Loader qw/make_schema_at/;

make_schema_at(
=A0=A0=A0 'mytestdb::Schema',
=A0=A0=A0 {debug =3D> 0, dump_directory =3D> '../db/',
=A0=A0=A0 generate_pod =3D> 0,},
=A0=A0=A0 ['dbi:mysql:robodb:localhost:3306', 'root', 'sqlpassowrd']',
);



i want to create that directory structure one dir above (from where my scri=
pt is), hence i want to use ../db/=A0=A0 (../db/ does not exist yet.)


thank you.
Rajeev



________________________________
From: Al Newkirk <awnstudio at gmail.com>
To: "dbix-class at lists.scsys.co.uk" <dbix-class at lists.scsys.co.uk>
Sent: Saturday, July 30, 2011 9:00 AM
Subject: Subject: [Dbix-class] Re: using as normal perl module To


It seems like you want bypass defining schema, etc.
Yes, we have a way to do that... See the Schema::Loader
_______________________________________________
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


_______________________________________________
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20110801/840=
9739f/attachment.htm


More information about the DBIx-Class mailing list