FAQ
Hi list,

I am trying to create accessors to load static data once per server
instance as described at :

http://search.cpan.org/~hkclark/Catalyst-Manual-5.7017/lib/Catalyst/Manual/Cookbook.pod#Create_accessors_to_preload_static_data_once_per_server_instance

Following this tuts, I modified my Schema class as follow in MyApp/lib

package GenoList;

use strict;
use warnings;

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

__PACKAGE__->load_classes;

__PACKAGE__->register_class('Organism',
'GenoList::Organism');
__PACKAGE__->mk_group_accessors('simple' => 'org_infos');

sub connection {

my($self, @rest) = @_;
$self->next::method(@rest);

my $rs = $self->resultset('Organism')
->search(undef, { 'columns' => [qw/id name shortname fullname
strain/]});

$self->org_infos({
id => $rs->id(),
name => $rs->fullname(),
shname => $rs->shortname(),
strain => $rs->strain || undef,
#dbname => $rs->dbname,
});

}

The first problem I have, sorry not to understand all the terms, is
to distinguish what is a RESULTSOURCEMONIKER.

While I start the catalyst server, I get the following error:
Couldn't instantiate component
"BiblioList::Model::GenoList::bovisR1db", "Can't locate object
method "id" via package "DBIx::Class::ResultSet" at
/home/tuco/src/perl/projects/Catalyst/BiblioList/bibliolist-0.06_02/script/../lib/GenoList.pm
line 23." at script/bibliolist_server.pl line 55

Can someone tell me what I am doing wrong?

Thanks for any help

Regards

Emmanuel


--
-------------------------
Emmanuel Quevillon
Biological Software and Databases Group
Institut Pasteur
+33 1 44 38 95 98
tuco at_ pasteur dot fr
-------------------------

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcatalyst @
categoriescatalyst, perl
postedMar 11, '09 at 3:04p
activeMar 11, '09 at 3:04p
posts1
users1
websitecatalystframework.org
irc#catalyst

1 user in discussion

Emmanuel Quevillon: 1 post

People

Translate

site design / logo © 2022 Grokbase