Thanks! this looks like it will work perfectly.
However, I'm still having a bit of trouble getting dispatching to work
properly. I have a handler set up under mod_perl to send all requests
that start with /dispatchperl/ to my dispatcher, and I have verfiied
that this setup is infact handling
I'm trying to play around with CGI::Application::Dispatch a bit and I'm
having some trouble getting it working and I'm hoping someone who has
experience with this module can offer some advice.
I have subclassed CGI::Application::Dispatch as follows:
package MyDispatch;
use base
Interesting approach, I've been thinking about doing something similar
to this, but it didn't seem worth the effort to me. Today would handle
that situation like:
my $sql = select * from view_JobList_Quick WHERE Filter='basic_filter'
$WhereClause;
if ($session-{'UserType') eq 'Publisher')
...@plusthree.comwrote:
On 03/04/2010 10:56 AM, Brad Van Sickle wrote:
2) Runmode authorization is a little trickier, but still manageable. I
check the user's session in prerun and if they are not authenticated,
redirect to a not authorized runmode that redirects them back
Tangential discussion on this... but what is the value in using
dispatching modules like CAP::Routes and CGI::Application::Dispatch?
I've looked at them in the past, and I've heard it mentioned many times
that they are wonderfully useful.. but I've never fully understood why.
Currently I'm
:25 AM, Brad Van Sickle bvansick...@gmail.com wrote:
Tangential discussion on this... but what is the value in using
dispatching modules like CAP::Routes and CGI::Application::Dispatch?
I've looked at them in the past, and I've heard it mentioned many times
that they are wonderfully useful
In postrun you can populate a variable with a subroutine call and then
substitute that variable anywhere in your template, or even insert it
into your runmode output if desired.
Is that what you are looking for, or am I way off base?
Gurunandan R. Bhat wrote:
Hi,
Is it possible to add
runmode?
I am not getting it. My bad, obviously
On Fri, 2009-10-30 at 14:55 -0400, Brad Van Sickle wrote:
You can initialize and populate your template in postrun as well.
The way I do it is I typically load the framework of the page using
HTML::Template in postrun, and then insert
Assigning those variables is the perfect thing to do in (again) postrun
when it is implemented in a superclass.
Gurunandan R. Bhat wrote:
I wanted to avoid, including the file, and then assigning the params
(Logged in/Not loggedin, Last login, etc) in each and every run mode
when their
the runmodes
cannot be cleanly separated from the fixed content (in my case a login form).
However in situations where such a separation in possible, yours is an
excellent and preferred solution, So Thanks
On Fri, 2009-10-30 at 15:25 -0400, Brad Van Sickle wrote:
My postrun sits
I find myself duplicating a lot of postrun code, so I'd like to move
that entire function up to a superclass file to centralize it.
My problem with doing that is that at I still have some logical
constructs that I need to set somewhere in each modules that are
module/runmode dependent.
For
That did it. One of those things that's obvious once it's pointed out.
Thanks!
Rhesa Rozendaal wrote:
Brad Van Sickle wrote:
I find myself duplicating a lot of postrun code, so I'd like to move
that entire function up to a superclass file to centralize it.
My problem with doing
This isn't a technical question, so I hope I'm not misusing this list...
I just discovered CGI::App a few weeks ago, and I'm still pretty new
to writing web applications using a reusable, extendable OO framework.
I can clearly see it's a better way of doing things than chaining .cgi
scripts
I'm running under mod_perl, not sure if that's relevant here or not... I
think it is because I've been able to get this working in a non-mod_perl
envrionment previously...
I'm attempting to validate a user's session in my cgi::app script. If
the session cookie is not present, or the session
;
if ( not logged in ) {
return $self-redirect('login.html');
}
}
Cheers,
Cees
On Tue, May 5, 2009 at 2:25 PM, Brad Van Sickle bvs7...@gmail.com wrote:
I'm running under mod_perl, not sure if that's relevant here or not... I
think it is because I've been
15 matches
Mail list logo