NAME
Catalyst::Base - Catalyst Universal Base Class
SYNOPSIS
# lib/MyApp/Model/Something.pm
package MyApp::Model::Something;
use base 'Catalyst::Base';
__PACKAGE__->config( foo => 'bar' );
sub test {
my $self = shift;
return $self->{foo};
}
sub forward_to_me {
my ( $self, $c ) = @_;
$c->response->output( $self->{foo} );
}
1;
# Methods can be a request step
$c->forward(qw/MyApp::Model::Something forward_to_me/);
# Or just methods
print $c->comp('MyApp::Model::Something')->test;
print $c->comp('MyApp::Model::Something')->{foo};
DESCRIPTION
This is the universal base class for Catalyst components (Model/View/Controller).
It provides you with a generic new() for instantiation through Catalyst's component loader with config() support and a process() method placeholder.
METHODS
SEE ALSO
AUTHOR
Sebastian Riedel, sri@cpan.org
Marcus Ramberg, mramberg@cpan.org
COPYRIGHT
This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself.