Naylor Garcia wrote:
I am creating a sub in the Model/IMAP.pm makes no connection with the database, but performs authentication via IMAP. But failing to call this sub in the controller.

I am new to Catalyst and appreciate the help.

Hi.

Sorry, but you haven't explained what you're actually trying to achieve here.

Maybe it would help if you showed us the code you're trying to call, and how you're trying to call it.

You would generally say:

package MyApp::Model::Foo;
use base qw/Catalyst::Model/;

sub my_method { 'fnar' }

package MyApp::Controller::Foo;
use base qw/Catalyst::Controller/;

sub something : Local {
    my ($self, $c) = @_;
    $c->model('Foo')->my_method;
}

Does that help?

Cheers
t0m

_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to