[Catalyst] Catalyst 5.7012

Anthony Gardner cyclewood_ltd at yahoo.co.uk
Mon Dec 24 12:56:57 GMT 2007


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.

So, code .......

lib/TestAppDB.pm
package TestAppDB;

use strict;
use base 'DBIx::Class::Schema';

my $pkg = __PACKAGE__;

$pkg->load_classes();
1;

lib/TestAppDB/Person.pm
package TestAppDB::Person;

use base 'DBIx::Class';

my $pkg = __PACKAGE__;

$pkg->load_components(qw/PK::Auto Core/);

$pkg->table('people');
$pkg->add_columns(qw|id name|);
$pkg->set_primary_key('id');

1;

lib/TestApp/Model/Person.pm
package TestApp::Model::Person;

use strict;
use base 'Catalyst::Model::DBIC::Schema';

__PACKAGE__->config(
    schema_class => 'TestAppDB',
    connect_info => [
        'dbi:SQLite:/path/to/db/TestDB.db',
        '',
        '',
        {},

    ],
);

Error output is just coming from the server at present.

Any pointers would be great.

CIA

-Ants


Jonathan Rockway <jon at jrock.us> wrote: 
On Mon, 2007-12-24 at 12:38 +0000, Anthony Gardner wrote:
> This is really basic but I was having a problem with a new Catalyst
> project but I kept getting this error ........
> 
> "Can't call method "resultset" on an undefined value
> 
> | TestApp::Model::Person                    | instance |
> | TestApp::Model::Person::Person            | class    |
> Where this sticks out TestApp::Model::Person::Person. 

How about providing us with some code?  We can't read your mind.

That said, my suspicion is that you Model::Person is a DBIC model and
you have a Person result source class in your DBIC schema.  In that
case, this is the output I'd expect.  Something else is probably the
problem.

What code are you running to generate the error?  What is the line
number of the error?

Regards,
Jonathan Rockway
_______________________________________________
List: Catalyst at lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/



Disclaimer: Technically, I'm always wrong!!
       
---------------------------------
 Sent from Yahoo! &#45; a smarter inbox.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20071224/9c647473/attachment.htm


More information about the Catalyst mailing list