<div dir="ltr">Hi,
<br><br>I am very new to Catalyst and have found it pretty exciting so
far. I have a very basic "People" database table and whenever I try to
run the following script:
<br><br><br>#!/usr/bin/perl
<br><br>use strict;
<br>use warnings;
<br><br>use lib qw( lib ../lib );
<br><br><br>use Markets::Schema::MarketDB;
<br>use Markets::Model::MarketDB;
<br><br># demonstrate picking up database connection info
<br>my $connect_info = Markets::Model::MarketDB->config->{connect_info};
<br>print "connecting schema to ".$connect_info->[0]."\n";
<br><br># connect to the Catalyst schema
<br>my $schema = Markets::Schema::MarketDB->connect( @$connect_info );
<br><br><br># list all People
<br>print "listing all People\n";
<br>my $rs = $schema->resultset('People')->search({});
<br>for my $row ( $rs->all ){
<br> print "\nPerson ". $row->id ."\t - Name " . $row->first_name . "\n";
<br>}
<br><br>1;
<br>
<br>from .../markets/script/test.pl I get the following error:
<br><br>connecting schema to dbi:SQLite:database
<br>listing all People
<br>DBIx::Class::ResultSet::all(): DBI Exception: DBD::SQLite::db
prepare_cached failed: no such table: people(1) at dbdimp.c line 271
[for Statement "SELECT <a href="http://me.id">me.id</a>, me.first_name, me.last_name FROM people
me"] at test.pl line 26
<br><br>It seems I am successfully connecting but failing to read from my database? Any ideas what I may be doing wrong? Please help!</div>