3574577ad7
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; }
21 lines
710 B
Makefile
21 lines
710 B
Makefile
# $NetBSD: Makefile,v 1.1.1.1 2008/07/15 09:15:42 abs Exp $
|
|
|
|
DISTNAME= Catalyst-Component-ACCEPT_CONTEXT-0.05
|
|
PKGNAME= p5-${DISTNAME}
|
|
CATEGORIES= www perl5
|
|
MASTER_SITES= ${MASTER_SITE_PERL_CPAN:=Catalyst/}
|
|
|
|
MAINTAINER= pkgsrc-users@NetBSD.org
|
|
HOMEPAGE= http://search.cpan.org/~jrockway/Catalyst-Component-ACCEPT_CONTEXT/
|
|
COMMENT= Make current Catalyst request context available in Models and Views
|
|
|
|
DEPENDS+= p5-Catalyst-Runtime>=0:../../www/p5-Catalyst-Runtime
|
|
DEPENDS+= p5-Devel-Cycle>0:../../devel/p5-Devel-Cycle
|
|
|
|
USE_LANGUAGES= # empty
|
|
PERL5_PACKLIST= auto/Catalyst/Component/ACCEPT_CONTEXT/.packlist
|
|
|
|
PKG_DESTDIR_SUPPORT= user-destdir
|
|
|
|
.include "../../lang/perl5/module.mk"
|
|
.include "../../mk/bsd.pkg.mk"
|