Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11]) by narn.NetBSD.org (Postfix) with ESMTP id D94C163BB24 for ; Tue, 15 Jul 2008 09:15:43 +0000 (UTC) Received: by mail.netbsd.org (Postfix, from userid 0) id 8E33563B425; Tue, 15 Jul 2008 09:15:43 +0000 (UTC) Received: from cvs.netbsd.org (unknown [IPv6:2001:4f8:4:7:2e0:81ff:fe25:eab4]) by mail.netbsd.org (Postfix) with ESMTP id C4DF663B121 for ; Tue, 15 Jul 2008 09:15:42 +0000 (UTC) Received: by cvs.netbsd.org (Postfix, from userid 500) id AECAA175D0; Tue, 15 Jul 2008 09:15:42 +0000 (UTC) From: David Brownlee Subject: CVS commit: pkgsrc/www/p5-Catalyst-Component-ACCEPT_CONTEXT To: pkgsrc-changes@NetBSD.org Reply-To: abs@netbsd.org Message-Id: <20080715091542.AECAA175D0@cvs.netbsd.org> Date: Tue, 15 Jul 2008 09:15:42 +0000 (UTC) Sender: pkgsrc-changes-owner@NetBSD.org List-Id: pkgsrc-changes Precedence: list Module Name: pkgsrc Committed By: abs Date: Tue Jul 15 09:15:42 UTC 2008 Update of /cvsroot/pkgsrc/www/p5-Catalyst-Component-ACCEPT_CONTEXT In directory ivanova.netbsd.org:/tmp/cvs-serv12873 Log Message: 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 N pkgsrc/www/p5-Catalyst-Component-ACCEPT_CONTEXT/DESCR N pkgsrc/www/p5-Catalyst-Component-ACCEPT_CONTEXT/Makefile N pkgsrc/www/p5-Catalyst-Component-ACCEPT_CONTEXT/distinfo No conflicts created by this import