On Thu, Oct 19, 2006 at 10:10:01PM +0200, Gerald Richter wrote: > > > > I am using Embperl::Object 2.2.0 (with mod_perl 2.0.2 on > > Apache 2.0.58) I've been trying to implement an email form, > > and have been completely baffled because the mail was always > > being sent twice. > > Trying to track things down, I put some warning calls in my > > epwebapp.pl file, and it seems as if get_recipe is being called twice: > > once from Embperl::Object and once from Embperl::Req > > get_recipe is called for every file that Embperl processes.
Yes, I know; the debug code I put in there was giving information about the file that was being processed, and I was puzzled and concerned that the .html file containg the email code was being called twice. > Embperl::Object loads the file and executes the [! !] blocks, while during > the request the other blocks are executed. For both types of file access > get_recipe is called. Ah. There are [! and [- and [+ blocks in the file; that explains it. > Since get_recipe is only intened to return a recipe > and not to do any processing, this should be no problem at all, but gives > you the chance to change your recipe during the request initialisation. Why would one want to do that? And how? > I don't see why your mail is sent twice, because of the double call to > get_recipe. Do you send your mail inside of get_recipe? Certainly not! > If yes, you should > use an application object instead and use the init method to do such work. I'm not following you here. Kathryn Andersen -- _--_|\ | Kathryn Andersen <http://www.katspace.com> / \ | \_.--.*/ | GenFicCrit mailing list <http://www.katspace.com/gen_fic_crit/> v | ------------| Melbourne -> Victoria -> Australia -> Southern Hemisphere Maranatha! | -> Earth -> Sol -> Milky Way Galaxy -> Universe --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]