<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<style>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
pre
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:Arial;
        color:windowtext;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
/* List Definitions */
@list l0
        {mso-list-id:492598992;
        mso-list-type:hybrid;
        mso-list-template-ids:-16073228 -196847518 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
        {mso-level-text:"%1\)";
        mso-level-tab-stop:.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        color:windowtext;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
-->
</style>
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal style='margin-right:1.0in;text-align:justify'><font size=2
face=Arial><span style='font-size:10.0pt;font-family:Arial'>Hi, I would REALLY
like to implement DBIx::Class for our project that currently uses a different
database gateway. I would like to implement it slowly if possible, and
eventually ‘unhook’ our project from the old gateway. This is what
I would like to do. Can you tell me if this is possible?<o:p></o:p></span></font></p>
<p class=MsoNormal style='margin-right:1.0in;text-align:justify'><font size=2
face=Arial><span style='font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='mso-margin-top-alt:0in;margin-right:1.0in;margin-bottom:
0in;margin-left:.5in;margin-bottom:.0001pt;text-align:justify;text-indent:-.25in;
mso-list:l0 level1 lfo1'><![if !supportLists]><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'><span style='mso-list:Ignore'>1)<font
size=1 face="Times New Roman"><span style='font:7.0pt "Times New Roman"'>
</span></font></span></span></font><![endif]><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>I am looking at the CatalystBasics
tutorial, which I did some time ago. I have a mysql database, and I want to
add to the MyAppDB.pm file a line like this: (Notice that I am only adding one
table. <font color=red><span style='color:red'>Can I just add one table to
test?</span></font>)<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-margin-top-alt:0in;margin-right:1.0in;margin-bottom:
0in;margin-left:.25in;margin-bottom:.0001pt;text-align:justify'><font size=2
face=Arial><span style='font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></font></p>
<pre><font size=2 face="Courier New"><span style='font-size:10.0pt'>__PACKAGE__->load_classes({<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> MyAppDB => [qw/prot/]<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'> });<o:p></o:p></span></font></pre>
<p class=MsoNormal style='mso-margin-top-alt:0in;margin-right:1.0in;margin-bottom:
0in;margin-left:.5in;margin-bottom:.0001pt;text-align:justify'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'> </span></font><font
size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'><o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-margin-top-alt:0in;margin-right:1.0in;margin-bottom:
0in;margin-left:.5in;margin-bottom:.0001pt;text-align:justify;text-indent:-.25in;
mso-list:l0 level1 lfo1'><![if !supportLists]><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'><span style='mso-list:Ignore'>2)<font
size=1 face="Times New Roman"><span style='font:7.0pt "Times New Roman"'>
</span></font></span></span></font><![endif]><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>Next, I think I would create a
MyAppDB/prot.pm file, and load the one table and columns just like in the
tutorial. One question about this: <font color=red><span style='color:red'>Do
I have to establish relationships (many_to_many, etc) now, in this file, like
in the tutorial?<o:p></o:p></span></font></span></font></p>
<p class=MsoNormal style='mso-margin-top-alt:0in;margin-right:1.0in;margin-bottom:
0in;margin-left:.25in;margin-bottom:.0001pt;text-align:justify'><font size=2
color=red face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:red'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='mso-margin-top-alt:0in;margin-right:1.0in;margin-bottom:
0in;margin-left:.5in;margin-bottom:.0001pt;text-align:justify;text-indent:-.25in;
mso-list:l0 level1 lfo1'><![if !supportLists]><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'><span style='mso-list:Ignore'>3)<font
size=1 face="Times New Roman"><span style='font:7.0pt "Times New Roman"'>
</span></font></span></span></font><![endif]><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>Then I need to run this line on the
command line: (<font color=red><span style='color:red'>Can I replace ‘tutorial’
with anything I want?</span></font>)</span></font><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'><o:p></o:p></span></font></p>
<p class=MsoNormal style='margin-right:1.0in;text-align:justify'><font size=2
face=Arial><span style='font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='margin-right:1.0in;text-align:justify'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>$ script/myapp_create.pl
model MyAppDB DBIC::Schema MyAppDB dbi:mysql 'tutorial' '' '{ AutoCommit =>
1 }'<o:p></o:p></span></font></p>
<p class=MsoNormal style='margin-right:1.0in;text-align:justify'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='margin-right:1.0in;text-align:justify'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>Thanks,<o:p></o:p></span></font></p>
<p class=MsoNormal style='margin-right:1.0in;text-align:justify'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='margin-right:1.0in;text-align:justify'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>Emily</span></font><font
size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'><o:p></o:p></span></font></p>
<pre><font size=2 face="Courier New"><span style='font-size:10.0pt'> <o:p></o:p></span></font></pre>
<p class=MsoNormal><u><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'><o:p><span style='text-decoration:none'> </span></o:p></span></font></u></p>
</div>
</body>
</html>