HI all:
I am a Catalyst beginner and run into this problem
since I have a model like this

package MyApp::Model::Trial;
use strict;
use warnings;

sub new{
my $pack = shift;
my $self = bless {
foo => 'default value foo',
},$pack;
return $self;
}

sub get{
return shift->{'foo'};
}
1

how could I pass this "foo" to the controller?
I tried some code like this
my $a = $c->model('Trial::new');
$c->stash->{word} = $a->get;

or
my $a = $c->model('Trial');
$c->stash->{word} = $a->get;

both of them run into some exceptions


thx for helping
_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/

Reply via email to