[Catalyst] Catalyst::Model::CDBI::CRUD

Robert Boone robert at rlb3.com
Fri Mar 11 17:51:00 CET 2005


Hello,
	I can't seem to figure out Catalyst::Model::CDBI::CRUD. I have followed
the manual but there seems to be a few things that I still don't
understand. This is what I have so far.

###################################################################################

package WT::Keyshop::M::CRUD;

use strict;
use base 'Catalyst::Model::CDBI::CRUD';

__PACKAGE__->config(
    dsn           => 'dbi:Pg:dbname=keyshop',
    user          => 'user',
    password      => 'pass',
    options       => { AutoCommit => 1 },
    relationships => 1
);

1;
###################################################################################

package WT::Keyshop::V::TT;

use strict;
use base 'Catalyst::View::TT';

#And I did copy the templates in to the root directory.

1;
###################################################################################

package WT::Keyshop;

use strict;
use Catalyst qw/-Debug FormValidator/;

our $VERSION = '0.01';

WT::Keyshop->config(
    name => 'WT::Keyshop',
    root => '/home/robert/projects/WT-Keyshop/root',
);


__PACKAGE__->action(
        'issuedkey' => sub {
            my ( $self, $c ) = @_;
            $c->form( optional => [ WT::Keyshop::M::CRUD::IssuedKey-
>columns ] );
            $c->stash->{template} = 'list';
            $c->forward('WT::Keyshop::V::TT');
        }
    );
1;

###################################################################################



The output what I run the server is:

[Fri Mar 11 10:47:54 2005] [catalyst] [debug] Debug messages enabled
[Fri Mar 11 10:47:54 2005] [catalyst] [debug] Loaded plugin
"Catalyst::Plugin::FormValidator"
[Fri Mar 11 10:47:54 2005] [catalyst] [debug] Loaded engine
"Catalyst::Engine::CGI"
[Fri Mar 11 10:47:56 2005] [catalyst] [debug] Loaded tables "building
dept issued_key person wtkey"
[Fri Mar 11 10:47:56 2005] [catalyst] [debug] Initialized components
"WT::Keyshop::M::CRUD::Person WT::Keyshop::M::CRUD::Dept
WT::Keyshop::M::CRUD::Building WT::Keyshop::V::TT
WT::Keyshop::M::CRUD::IssuedKey WT::Keyshop::M::CRUD
WT::Keyshop::M::CRUD::Wtkey"
[Fri Mar 11 10:47:56 2005] [catalyst] [info] WT::Keyshop powered by
Catalyst 4.23
[Fri Mar 11 10:47:56 2005] [catalyst] [debug] "WT::Keyshop" defined
"issuedkey" as "CODE(0x9cb7a20)"
You can connect to your server at http://localhost:3001



The error i'm getting is:

Couldn't render template "plugin error - Null filename used at (eval 81)
line 2. ...propagated
at /usr/local/lib/perl5/site_perl/5.8.6/Template/Plugin/Class.pm line
16. "


Can someone tell me what I'm doing wrong.

Thanks,
Robert



More information about the Catalyst mailing list