[cgiapp] Using ValidateRM etc...

2005-03-21 Thread Jeff MacDonald
Hi, I'm trying to expand my knowlege of C::A by finally incorporating some of the great sub modules into my applications.. Im writing a piece of software for booking swimming pool maintanence.. Here is my runmode that actually takes the data, validates it, and saves the data.. sub bookPool_do

Re: [cgiapp] Using ValidateRM etc...

2005-03-21 Thread Michael Peters
Jeff MacDonald wrote: Hi, I'm trying to expand my knowlege of C::A by finally incorporating some of the great sub modules into my applications.. It should make your life a little easier :) ValidateRM works great for validating the form, but I'm looking for an effecient way to display errors if the

Re: [cgiapp] Using ValidateRM etc...

2005-03-21 Thread Jason Purdy
D'oh! Forgot that part! Also, you may need to put whatever flag in that anonymous hashref ('some_errors' in the docs) that triggers your template code that something is off. - Jason Michael Peters wrote: Jason Purdy wrote: if (!$bookid) { return $self-bookPool( { 'db_error' = 1,

Re: [cgiapp] Using ValidateRM etc...

2005-03-21 Thread Jeff MacDonald
Thanks so much guys, here is what i ended up doing before seeing any replies *snipp* if (!$bookid) { my $fif = new HTML::FillInForm; my $output = $fif-fill(scalarref = \bookPool($self), fobject = $q); return $output; } else { return true; } Before I get lynched for having

Re: [cgiapp] Using ValidateRM etc...

2005-03-21 Thread Cees Hek
On Mon, 21 Mar 2005 13:49:45 -0500, Michael Peters [EMAIL PROTECTED] wrote: This doesn't answer the question of how to duplicate the sticky form behavior of ValidateRM. He'd still have to use HTML::FillInForm. So something like: # if we got to this point, we have valid input, so we should

Re: [cgiapp] Using ValidateRM etc...

2005-03-21 Thread Jeff MacDonald
once again THANKS.. wow. great support. we went from having our own inhouse crap assed framework, to CGI:App. i'm delited ;) On Mon, 21 Mar 2005 14:30:36 -0500, Cees Hek [EMAIL PROTECTED] wrote: On Mon, 21 Mar 2005 13:49:45 -0500, Michael Peters [EMAIL PROTECTED] wrote: This doesn't

[cgiapp] Is this the best way to use Cache::FileCache to cache output?

2005-03-21 Thread Barry Hoggard
I'm working on a site that does a lot of mysql hits, and I want to cache pages for an hour. Here is a quick summary of how I'm doing it, in a base class for all CGI::Application modules. I will add some kind of package or method regex when I get to the pages that I don't want cached. Is

[cgiapp] Global default for Templates

2005-03-21 Thread Dan Horne
I'm looking at running one of my CGI apps under mod_perl using Apache::Registry to see how it performs. Apart from persistent DB connections, I guess the other benefit I'm looking to receive is the caching of templates. But I don't want to go through all of my modules adding the cache option to

Re: [cgiapp] Global default for Templates

2005-03-21 Thread Thilo Planz
Dan, I guess the other benefit I'm looking to receive is the caching of templates. But I don't want to go through all of my modules adding the cache option to load_tmpl. Can I set this somehow in my base class's prerun or init methods? You can override your base class's load_tmpl method (now

RE: [cgiapp] Global default for Templates

2005-03-21 Thread Dan Horne
Thanks very much, Thilo Dan -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, 22 March 2005 16:51 To: [EMAIL PROTECTED] Cc: cgiapp@lists.erlbaum.net Subject: Re: [cgiapp] Global default for Templates Dan, I guess the other benefit I'm looking to