Sorry, missed a bit .........<br><br>lib/TestApp/Controller/Person.pm<br>...<br>sub list : Local {<br> my ($self, $c) = @_;<br><br> $c->stash->{people} = [$c->model('TestAppDB')->resultset('Person')->all()];<br><br> $c->stash->{template} = 'people/list.tt2';<br>}<br><br>Have played with $c->model('TestAppDB')->resultset('Person')->all() and $c->model('TestAppDB::Person')->all()<br><br>and the error in the browser is ........<br><pre><code class="error"> 30: sub list : Local {<br> 31: my ($self, $c) = @_;<br> 32: <br><strong class="line"> 33: $c->stash->{people} = [$c->model('TestAppDB')->resultset('Person')->all()];<br></strong> 34: <br> 35: $c->stash->{template} = 'people/list.tt2';<br> 36: }</code></pre><br><br><b><i>Anthony Gardner <cyclewood_ltd@yahoo.co.uk></i></b> wrote:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16,
255); margin-left: 5px; padding-left: 5px;"> Yes, code would help, but I wanted to just have a pointer as to where the classes are loaded/instantiated so I could track it down and sort it out myself.<br><br>So, code .......<br><br>lib/TestAppDB.pm<br>package TestAppDB;<br><br>use strict;<br>use base 'DBIx::Class::Schema';<br><br>my $pkg = __PACKAGE__;<br><br>$pkg->load_classes();<br>1;<br><br>lib/TestAppDB/Person.pm<br>package TestAppDB::Person;<br><br>use base 'DBIx::Class';<br><br>my $pkg = __PACKAGE__;<br><br>$pkg->load_components(qw/PK::Auto Core/);<br><br>$pkg->table('people');<br>$pkg->add_columns(qw|id name|);<br>$pkg->set_primary_key('id');<br><br>1;<br><br>lib/TestApp/Model/Person.pm<br>package TestApp::Model::Person;<br><br>use strict;<br>use base 'Catalyst::Model::DBIC::Schema';<br><br>__PACKAGE__->config(<br> schema_class => 'TestAppDB',<br> connect_info =>
[<br> 'dbi:SQLite:/path/to/db/TestDB.db',<br> '',<br> '',<br> {},<br><br> ],<br>);<br><br>Error output is just coming from the server at present.<br><br>Any pointers would be great.<br><br>CIA<br><br>-Ants<br><br><br><b><i>Jonathan Rockway <jon@jrock.us></i></b> wrote:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> <br>On Mon, 2007-12-24 at 12:38 +0000, Anthony Gardner wrote:<br>> This is really basic but I was having a problem with a new Catalyst<br>> project but I kept getting this error ........<br>> <br>> "Can't call method "resultset" on an undefined value<br>> <br>> | TestApp::Model::Person | instance |<br>> | TestApp::Model::Person::Person | class |<br>>
Where this sticks out TestApp::Model::Person::Person. <br><br>How about providing us with some code? We can't read your mind.<br><br>That said, my suspicion is that you Model::Person is a DBIC model and<br>you have a Person result source class in your DBIC schema. In that<br>case, this is the output I'd expect. Something else is probably the<br>problem.<br><br>What code are you running to generate the error? What is the line<br>number of the error?<br><br>Regards,<br>Jonathan Rockway<br>_______________________________________________<br>List: Catalyst@lists.scsys.co.uk<br>Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst<br>Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/<br>Dev site: http://dev.catalyst.perl.org/<br></blockquote><br><br><br>Disclaimer: Technically, I'm always wrong!!<div> </div><hr size="1"> Sent from <a
href="http://us.rd.yahoo.com/mailuk/taglines/isp/control/*http://us.rd.yahoo.com/evt=51949/*http://uk.docs.yahoo.com/mail/winter07.html">Yahoo!</a> - a smarter inbox._______________________________________________<br>List: Catalyst@lists.scsys.co.uk<br>Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst<br>Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/<br>Dev site: http://dev.catalyst.perl.org/<br></blockquote><br><br><br><b><i>Anthony Gardner <cyclewood_ltd@yahoo.co.uk></i></b> wrote:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> Yes, code would help, but I wanted to just have a pointer as to where the classes are loaded/instantiated so I could track it down and sort it out myself.<br><br>So, code .......<br><br>lib/TestAppDB.pm<br>package TestAppDB;<br><br>use strict;<br>use base 'DBIx::Class::Schema';<br><br>my $pkg =
__PACKAGE__;<br><br>$pkg->load_classes();<br>1;<br><br>lib/TestAppDB/Person.pm<br>package TestAppDB::Person;<br><br>use base 'DBIx::Class';<br><br>my $pkg = __PACKAGE__;<br><br>$pkg->load_components(qw/PK::Auto Core/);<br><br>$pkg->table('people');<br>$pkg->add_columns(qw|id name|);<br>$pkg->set_primary_key('id');<br><br>1;<br><br>lib/TestApp/Model/Person.pm<br>package TestApp::Model::Person;<br><br>use strict;<br>use base 'Catalyst::Model::DBIC::Schema';<br><br>__PACKAGE__->config(<br> schema_class => 'TestAppDB',<br> connect_info => [<br> 'dbi:SQLite:/path/to/db/TestDB.db',<br> '',<br> '',<br> {},<br><br> ],<br>);<br><br>Error output is just coming from the server at present.<br><br>Any pointers would be
great.<br><br>CIA<br><br>-Ants<br><br><br><b><i>Jonathan Rockway <jon@jrock.us></i></b> wrote:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> <br>On Mon, 2007-12-24 at 12:38 +0000, Anthony Gardner wrote:<br>> This is really basic but I was having a problem with a new Catalyst<br>> project but I kept getting this error ........<br>> <br>> "Can't call method "resultset" on an undefined value<br>> <br>> | TestApp::Model::Person | instance |<br>> | TestApp::Model::Person::Person | class |<br>> Where this sticks out TestApp::Model::Person::Person. <br><br>How about providing us with some code? We can't read your mind.<br><br>That said, my suspicion is that you Model::Person is a DBIC model and<br>you have a Person result source class in your DBIC schema. In that<br>case, this is the output I'd expect. Something else is probably
the<br>problem.<br><br>What code are you running to generate the error? What is the line<br>number of the error?<br><br>Regards,<br>Jonathan Rockway<br>_______________________________________________<br>List: Catalyst@lists.scsys.co.uk<br>Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst<br>Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/<br>Dev site: http://dev.catalyst.perl.org/<br></blockquote><br><br><br>Disclaimer: Technically, I'm always wrong!!<div> </div><hr size="1"> Sent from <a href="http://us.rd.yahoo.com/mailuk/taglines/isp/control/*http://us.rd.yahoo.com/evt=51949/*http://uk.docs.yahoo.com/mail/winter07.html">Yahoo!</a> - a smarter inbox._______________________________________________<br>List: Catalyst@lists.scsys.co.uk<br>Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst<br>Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/<br>Dev site:
http://dev.catalyst.perl.org/<br></blockquote><br><br><br><b><i>Anthony Gardner <cyclewood_ltd@yahoo.co.uk></i></b> wrote:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> Yes, code would help, but I wanted to just have a pointer as to where the classes are loaded/instantiated so I could track it down and sort it out myself.<br><br>So, code .......<br><br>lib/TestAppDB.pm<br>package TestAppDB;<br><br>use strict;<br>use base 'DBIx::Class::Schema';<br><br>my $pkg = __PACKAGE__;<br><br>$pkg->load_classes();<br>1;<br><br>lib/TestAppDB/Person.pm<br>package TestAppDB::Person;<br><br>use base 'DBIx::Class';<br><br>my $pkg = __PACKAGE__;<br><br>$pkg->load_components(qw/PK::Auto Core/);<br><br>$pkg->table('people');<br>$pkg->add_columns(qw|id name|);<br>$pkg->set_primary_key('id');<br><br>1;<br><br>lib/TestApp/Model/Person.pm<br>package TestApp::Model::Person;<br><br>use strict;<br>use base
'Catalyst::Model::DBIC::Schema';<br><br>__PACKAGE__->config(<br> schema_class => 'TestAppDB',<br> connect_info => [<br> 'dbi:SQLite:/path/to/db/TestDB.db',<br> '',<br> '',<br> {},<br><br> ],<br>);<br><br>Error output is just coming from the server at present.<br><br>Any pointers would be great.<br><br>CIA<br><br>-Ants<br><br><br><b><i>Jonathan Rockway <jon@jrock.us></i></b> wrote:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> <br>On Mon, 2007-12-24 at 12:38 +0000, Anthony Gardner wrote:<br>> This is really basic but I was having a problem with a new Catalyst<br>> project but I kept getting this error ........<br>> <br>> "Can't call method "resultset" on an
undefined value<br>> <br>> | TestApp::Model::Person | instance |<br>> | TestApp::Model::Person::Person | class |<br>> Where this sticks out TestApp::Model::Person::Person. <br><br>How about providing us with some code? We can't read your mind.<br><br>That said, my suspicion is that you Model::Person is a DBIC model and<br>you have a Person result source class in your DBIC schema. In that<br>case, this is the output I'd expect. Something else is probably the<br>problem.<br><br>What code are you running to generate the error? What is the line<br>number of the error?<br><br>Regards,<br>Jonathan Rockway<br>_______________________________________________<br>List: Catalyst@lists.scsys.co.uk<br>Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst<br>Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/<br>Dev site: http://dev.catalyst.perl.org/<br></blockquote><br><br><br>Disclaimer:
Technically, I'm always wrong!!<div> </div><hr size="1"> Sent from <a href="http://us.rd.yahoo.com/mailuk/taglines/isp/control/*http://us.rd.yahoo.com/evt=51949/*http://uk.docs.yahoo.com/mail/winter07.html">Yahoo!</a> - a smarter inbox._______________________________________________<br>List: Catalyst@lists.scsys.co.uk<br>Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst<br>Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/<br>Dev site: http://dev.catalyst.perl.org/<br></blockquote><br><BR><BR>Disclaimer: Technically, I'm always wrong!!<p> 
<hr size=1> Support the World Aids Awareness campaign this month with <a href="http://us.rd.yahoo.com/mailuk/taglines/isp/control/*http://us.rd.yahoo.com/evt=51947/*http://uk.promotions.yahoo.com/forgood/">Yahoo! for Good</a>