Sophie

Sophie

distrib > Mageia > 6 > i586 > media > core-release > by-pkgid > 8e565763e597b35d0e62f7cc7d8887f2

perl-Catalyst-Component-ACCEPT_CONTEXT-0.70.0-3.mga6.noarch.rpm

Description:

Models and Views don't usually have access to the request object, since
they probably don't really need it. Sometimes, however, having the request
context available outside of Controllers makes your application cleaner.
If that's the case, just use this module as a base class:

package MyApp::Model::Foobar;
use base qw|Catalyst::Component::ACCEPT_CONTEXT Catalyst::Model|;

Then, you'll be able to get the current request object from within your
model:

sub do_something {
my $self = shift;
print "The current URL is ". $self->context->req->uri->as_string;
}

Sources packages:

Other version of this rpm: