Added www/p5-Catalyst-Component-ACCEPT_CONTEXT version 0.05
authorabs <abs>
Tue, 15 Jul 2008 09:15:42 +0000 (09:15 +0000)
committerabs <abs>
Tue, 15 Jul 2008 09:15:42 +0000 (09:15 +0000)
commitf13defd805d160a56ceee870016497b4bfe6c180
tree206d78579155c5d52db22702ee43830ab4551a55
parente16ba162580eb1c91cda645d565387d69841b046
Added www/p5-Catalyst-Component-ACCEPT_CONTEXT version 0.05

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;
    }
www/p5-Catalyst-Component-ACCEPT_CONTEXT/DESCR [new file with mode: 0644]
www/p5-Catalyst-Component-ACCEPT_CONTEXT/Makefile [new file with mode: 0644]
www/p5-Catalyst-Component-ACCEPT_CONTEXT/distinfo [new file with mode: 0644]