[Catalyst] n00b question
Eric W. Bates
ericx at vineyard.net
Wed Jun 14 16:57:54 CEST 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Justin Guenther wrote:
> On 6/13/06, Eric W. Bates <ericx at vineyard.net> wrote:
>> Building my first catalyst app and I'm getting what must be an obvious
>> error. I have created the first controller; but when I try to access
>> /plants/add, I get what must be a fundamental error:
>>
>> Couldn't forward to "HG". Does not implement "HG::Controller::Plants"
>>
>> The package HG::Controller::Plants exists. It is defined in the file
>> HG/lib/HG/Controller/Plants.pm. The server seems to find the files when
>> it is starting up:
>
> You're not going to get much help without posting the source for
> HG/lib/HG/Controller/Plants.pm.
Sorry. Assumed the error was prior to parsing the file...
# File: Plants.pm
# Author: Charlie Root, ericx at vineyard.net
# Date: Tue Jun 13 15:55:26 2006
# Time-stamp: <2006-06-13 17:24:37 ericx>
# Description: Plants controller
#
# $Id$
# $Log$
package HG::Controller::Plants;
use strict;
use warnings;
use base 'Catalyst::Controller';
=head2 default
The default renders a template.
=cut
sub default : Private {
my ( $self, $c ) = @_;
# Hello World
#$c->response->body('HG::Controller::Plants is on Catalyst!');
$c->stash->{template} = 'plant.tt';
}
=head2 add
Add a new plant into the database.
=cut
sub add : Local {
my $self = shift;
my $c = shift;
# 2 different syntax?
#$c->stash->{template} = 'plant_add.tt';
$c->stash(template => 'plant_add.tt');
}
10101;
> Justin Guenther
>
> _______________________________________________
> List: Catalyst at lists.rawmode.org
> Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
> Dev site: http://dev.catalyst.perl.org/
>
>
- --
Eric W. Bates
ericx at vineyard.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFEkCPyD1roJTQ4LlERAngfAJ97EeIf57EWnkjdTVTevowH/65BAQCeIQJt
1ywhryQ5rovgVNXbOmrfeA4=
=9RzM
-----END PGP SIGNATURE-----
More information about the Catalyst
mailing list