<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<TITLE>Message</TITLE>

<META content="MSHTML 6.00.2900.2873" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=575011723-29042006><FONT face=Arial color=#0000ff size=2>Whoops 
- I was using an older version of DBIx::Class. After upgrading, my error is 
now</FONT></SPAN></DIV>
<DIV><SPAN class=575011723-29042006><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=575011723-29042006><FONT face=Arial color=#0000ff 
size=2>./test.pl<BR>DBIx::Class::Schema::BEGIN(): Can't fetch data as class 
method at (eval 260) line 2<BR>BEGIN failed--compilation aborted at (eval 260) 
line 2.<BR>Compilation failed in require at ./test.pl line 3.<BR>BEGIN 
failed--compilation aborted at ./test.pl line 3.</FONT></SPAN></DIV>
<DIV><SPAN class=575011723-29042006><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=575011723-29042006><FONT face=Arial color=#0000ff 
size=2>Dan</DIV>
<DIV><BR></DIV></FONT></SPAN>
<BLOCKQUOTE dir=ltr 
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
  <DIV></DIV>
  <DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT 
  face=Tahoma size=2>-----Original Message-----<BR><B>From:</B> 
  dbix-class-bounces@lists.rawmode.org 
  [mailto:dbix-class-bounces@lists.rawmode.org] <B>On Behalf Of </B>Dan 
  Horne<BR><B>Sent:</B> Sunday, 30 April 2006 11:07<BR><B>To:</B> 
  dbix-class@lists.rawmode.org<BR><B>Subject:</B> [Dbix-class] Error : Can't 
  locate object method "connect"<BR><BR></FONT></DIV><!-- Converted from text/rtf format -->
  <P><FONT face=Arial size=2>Hi</FONT> </P>
  <P><FONT face=Arial size=2>I've started experimenting with DBIx::Class, but my 
  initial efforts appear to be thwarted. The code:</FONT> </P>
  <P><FONT face=Arial size=2>My/Schema.pm:</FONT> </P>
  <P><FONT face=Arial size=2>package My::Schema;</FONT> <BR><FONT face=Arial 
  size=2>use base qw/DBIx::Class::Schema/;</FONT> <BR><FONT face=Arial 
  size=2>__PACKAGE__-&gt;load_classes(qw/Configuration/);</FONT> <BR><FONT 
  face=Arial size=2>1;</FONT> </P><BR>
  <P><FONT face=Arial size=2>My/Schema/Configuration.pm:</FONT> </P>
  <P><FONT face=Arial size=2>package My::Schema::Configuration;</FONT> <BR><FONT 
  face=Arial size=2>use base qw/DBIx::Class/;</FONT> <BR><FONT face=Arial 
  size=2>__PACKAGE__-&gt;load_components(qw/PK::Auto Core/);</FONT> <BR><FONT 
  face=Arial size=2>__PACKAGE__-&gt;table('configuration');</FONT> <BR><FONT 
  face=Arial 
  size=2>__PACKAGE__-&gt;add_columns('parameter_id','parameter','value','description','parameter_group','sort_order');</FONT> 
  <BR><FONT face=Arial 
  size=2>__PACKAGE__-&gt;set_primary_key('parameter_id');</FONT> <BR><FONT 
  face=Arial size=2>1;</FONT> </P>
  <P><FONT face=Arial size=2>And my test script, test.pl:</FONT> </P>
  <P><FONT face=Arial size=2>#!/usr/local/bin/perl -w</FONT> <BR><FONT 
  face=Arial size=2>use strict;</FONT> <BR><FONT face=Arial size=2>use 
  My::Schema;</FONT> <BR><FONT face=Arial size=2>my $schema =&nbsp; 
  My::Schema-&gt;connect('dbi:mysql:times_mig','root','');</FONT> </P>
  <P><FONT face=Arial size=2>However, when I run the test, I get:</FONT> </P>
  <P><FONT face=Arial size=2>Can't locate object method "connect" via package 
  "My::Schema" at ./test.pl line 4.</FONT> </P>
  <P><FONT face=Arial size=2>Can someone tell me what I'm doing wrong?</FONT> 
  </P>
  <P><FONT face=Arial size=2>Thanks</FONT> </P>
  <P><FONT face=Arial size=2>Dan Horne</FONT> </P></BLOCKQUOTE></BODY></HTML>