Re: [cgiapp] CGI::Application::Dispatch Question

2010-05-07 Thread Brad Van Sickle
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

[cgiapp] CGI::Application::Dispatch problem

2010-04-27 Thread Brad Van Sickle
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

Re: [cgiapp] Security, Authentication and Authorization for CGI::App

2010-03-05 Thread Brad Van Sickle
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')

Re: [cgiapp] Security, Authentication and Authorization for CGI::App

2010-03-05 Thread Brad Van Sickle
...@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

Re: [cgiapp] C::A::P::Routes

2010-03-04 Thread Brad Van Sickle
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

Re: [cgiapp] C::A::P::Routes

2010-03-04 Thread Brad Van Sickle
: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

Re: [cgiapp] Adding a div of fixed content to evey page. Possible?

2009-10-30 Thread Brad Van Sickle
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

Re: [cgiapp] Adding a div of fixed content to evey page. Possible?

2009-10-30 Thread Brad Van Sickle
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

Re: [cgiapp] Adding a div of fixed content to evey page. Possible?

2009-10-30 Thread Brad Van Sickle
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

Re: [cgiapp] Adding a div of fixed content to evey page. Possible?

2009-10-30 Thread Brad Van Sickle
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

[cgiapp] CGI::App - creating your own overloaded functions

2009-08-25 Thread Brad Van Sickle
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

Re: [cgiapp] CGI::App - creating your own overloaded functions

2009-08-25 Thread Brad Van Sickle
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

[cgiapp] Some general questions on CGI::App and OO web application design philosophy

2009-06-06 Thread Brad Van Sickle
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

[cgiapp] Redirecting with CGI::App Problem (possibly mod_perl related)

2009-06-04 Thread Brad Van Sickle
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

Re: [cgiapp] Redirecting with CGI::App Problem (possibly mod_perl related)

2009-06-04 Thread Brad Van Sickle
; 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