Link [ pkgsrc | NetBSD | pkgsrc git mirror | PR fulltext-search | netbsd commit viewer ]


   
        usage: [branch:branch] [user:user] [path[@revision]] keyword [... [-excludekeyword [...]]] (e.g. branch:MAIN pkgtools/pkg)




switch to index mode

recent branches: MAIN (11m)  pkgsrc-2024Q1 (6d)  pkgsrc-2023Q4 (52d)  pkgsrc-2023Q2 (85d)  pkgsrc-2023Q3 (164d) 

2024-05-23 14:09:51 UTC Now

2008-07-15 09:15:42 UTC MAIN commitmail json YAML

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;
    }

Status:

Vendor Tag: TNF
Release Tags: pkgsrc-base

(abs)