<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">


<META content="MSHTML 6.00.2800.1555" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial>
<P><FONT color=#0000ff size=2>I have DBIx::Class working using&nbsp;mysql<SPAN 
class=149124506-24082006>&nbsp;on win32&nbsp;</SPAN>. Here's my code<SPAN 
class=149124506-24082006>&nbsp; which is just designed to test the concept using 
a single table in my DB</SPAN>:</FONT></P><PRE class=code><DIV class=codeblock><TT class=codetext><FONT color=#0000ff><FONT size=2><FONT color=#800000># set up a schema class using 2 modules that I've written manually 
use MG::Schema::Tables;   # *
use MG::Schema::Country;  # *
my $schema = MG::Schema-&gt;connect('DBI:mysql:mg', 'jfrm', '???'); #* 

# Or better, fill the class with table info automatically (using a file called MG/Main.pm with content:
#package MG::Main;
#use base qw/DBIx::Class::Schema::Loader/;
#__PACKAGE__-&gt;loader_options(
#    relationships           =&gt; 1);

#use MG::Main;    #&amp;
#my $schema = MG::Main-&gt;connect('DBI:mysql:mg', 'jfrm', '????'); #&amp;

# Query for all countries and<SPAN class=149124506-24082006><FONT face=Arial color=#0000ff>&nbsp;</FONT></SPAN>put them in an array,
my @all_countries = $schema-&gt;resultset('Country')-&gt;all;
foreach my $country (@all_countries) {
    print "! ".$country-&gt;CountryCode." = ".$country-&gt;CountryName."&lt;Br&gt;";
    }</FONT><SPAN class=149124506-24082006><FONT face=Arial>&nbsp;</FONT></SPAN></FONT></FONT></TT></DIV><DIV class=codeblock><FONT color=#0000ff size=2><TT class=codetext><SPAN class=149124506-24082006></SPAN></TT></FONT>&nbsp;</DIV><DIV class=codeblock><FONT color=#0000ff size=2>So then I want to change to not have to write all the schemas out manually into modules by using the <SPAN class=149124506-24082006><FONT face=Arial>&nbsp;DBIx::Class::</FONT></SPAN>Schema::Loader module. <SPAN class=149124506-24082006><FONT face=Arial>&nbsp;</FONT></SPAN></FONT></DIV><DIV class=codeblock><FONT face=Arial color=#0000ff size=2><SPAN class=149124506-24082006>I just want to load them all into memory automatically.</SPAN></FONT></DIV><DIV class=codeblock><FONT color=#0000ff size=2>So I comment out the 3 lines labelled #* and uncomment the 2 lines with #&amp;. Here's the error:</FONT></DIV></PRE><PRE class=code><DIV class=codeblock><TT class=codetext><FONT color=#0000ff size=2><FONT color=#800000>[Wed Aug 23 18:22:49 2006] mgdb.pl: Attempt to free unreferenced scalar: SV 0x1fa7a5c, Perl interpreter: 0x224234 at C:/Perl/site/lib/SQL/Abstract/Limit.pm line 325.
[Wed Aug 23 18:22:49 2006] mgdb.pl:  at C:/Perl/site/lib/SQL/Abstract/Limit.pm line 325
Software error:
Can't locate object method "CountryCode" via package "MG::Main::Country" at C:/Information/mgroot/cgi-bin/mgdb.pl line 53.
 at C:/Information/mgroot/cgi-bin/mgdb.pl line 53</FONT>
</FONT></TT></DIV></PRE>
<P><FONT color=#0000ff><FONT size=2><SPAN 
class=149124506-24082006>&nbsp;</SPAN></FONT></FONT></P>
<P><FONT color=#0000ff><FONT size=2><FONT>Is this because I'm doing something 
wrong due to my very poor understanding of object methods?&nbsp;<SPAN 
class=149124506-24082006>&nbsp;(in which case your suggestions would be 
extremely welcome)</SPAN></FONT></FONT></FONT></P>
<P><FONT><FONT color=#0000ff><FONT size=2><FONT>Or is it a bug in 
this&nbsp;<SPAN class=149124506-24082006>&nbsp;SQL::</SPAN>Abstract::Limit 
module<SPAN class=149124506-24082006>&nbsp;.&nbsp;</SPAN> (in which case I'll do 
my best to put in a bug report if i can work out how<SPAN 
class=149124506-24082006>&nbsp; - Do I put it as a bug report for 
DBIx::Class::Schema::Loader or 
SQL::Abstract::Limit</SPAN>)?<BR></FONT></FONT></FONT></FONT><FONT size=2><SPAN 
class=149124506-24082006></SPAN></FONT></P>
<P><FONT size=2>thanks for any advice.</FONT></P></FONT></DIV></BODY></HTML>