Re: How to handle die

2002-01-20 Thread Mithun Bhattacharya

___cliff rayman___ wrote:


 [EMAIL PROTECTED]
 
 To subscribe to this Majordomo-controlled mailing list, just send an E-mail



Umm it didnt really answer my original query but I guess since no one 
has answered it - either I didnt present it correctly or no one has a 
answer to it.

I probably wont jump into the I want a newbie mailing list fray for 
this though ;).



Mithun




Re: How to handle die

2002-01-20 Thread Perrin Harkins

 Umm it didnt really answer my original query but I guess since no one
 has answered it - either I didnt present it correctly or no one has a
 answer to it.

Or you posted it late on Saturday night on a weekend when most US
workers have Monday off and may be travelling.  Not everyone is on the
same schedule as you, so give it a little time.

 I probably wont jump into the I want a newbie mailing list fray for
 this though ;).

I don't think it would make a difference.  It would be pretty much the
same people on either list.

There are a couple of people on this list who use ePerl.  You might want
to repost with ePerl in your subject.  However, most of us no longer
use it.  ePerl is getting old at this point and has a pretty small
feature set compared to the more actively maintained alternatives.

Here's an attempt to answer your questions:

 1. Is die supposed to be handled by ePerl/EmbPerl/Mason
 ... or did ePerl end up over ridding something. In that
 case I would rather have it restored to the default.

First, ePerl has nothing to do with Embperl or Mason.  It is a totally
separate program.

The Apache::ePerl code is very simple, and I suggest you read it at some
point.  It attempts to eval() your code, and does the behavior you saw
if it fails (which is what happens when your script does a die()).  I
don't think you can change that without changing the code, but that's
pretty easy to do.

 2. How do I implement a solution throughout the site without
 having to do goofy stuff in every HTML page or module.

Solution to what?  To having die() trapped?  Changing the Apache::ePerl
code will be a site-wide change, so I'd suggest you do it there.

 3. Why would anyone do that in the first place ?

Why catch exceptions?  Usually to allow the program to try something
else, clean up resources, or print a useful error message.

- Perrin




Re: How to handle die

2002-01-19 Thread ___cliff rayman___

Mithun Bhattacharya wrote:

 Before anyone suggests it - no I cant move to EmbPerl or Mason or
 anything else.

ok



 ePerl can be found as Apache::ePerl on cpan or
 http://www.engelschall.com/sw/eperl/ . I wouldnt know if Engelschall is
 on this list but if he is - feedback would be highly appreciated :).
 Also I wonder whether it has been abandoned or renamed since nothing has
 changed since 02-08-1998 (8th Feb ??). The latest version isnt on CPAN

his new project is wml:

http://www.engelschall.com/sw/wml/docs/
it has an eperl component.  not sure if it will run old ePerl code
however.  there is a mailing list at:

[EMAIL PROTECTED]

To subscribe to this Majordomo-controlled mailing list, just send an E-mail to
 [EMAIL PROTECTED] with only

   subscribe sw-wml [EMAIL PROTECTED]

--
___cliff [EMAIL PROTECTED]http://www.genwax.com/





How to handle die

2002-01-18 Thread Mithun Bhattacharya

Hello,

I am running ePerl on my Apache server and a little problem has been 
bugging me a lot. When I do a die blah blah blah inside a eval I get 
the following in my browser. It doesnt matter which browser I use or 
which version of apache I use or which version of Apache::ePerl I use.


Apache::ePerl
Version 2.0214

ERROR:
Error on evaluating script from P-code

Contents of STDERR channel:

blah blah blah at //tmp/test.html line 2.


logs/error_log says


[Sat Jan 19 11:23:01 2002] [error] access to //tmp/test.html failed 
for xx.xx.xx.xx, reason: Apache::ePerl: Error on evaluating script from 
P-code


I would like to know a couple of things in this context :
1. Is die supposed to be handled by ePerl/EmbPerl/Mason ... or did ePerl 
end up over ridding something. In that case I would rather have it 
restored to the default.
2. How do I implement a solution throughout the site without having to 
do goofy stuff in every HTML page or module.
3. Why would anyone do that in the first place ?

Before anyone suggests it - no I cant move to EmbPerl or Mason or 
anything else.

ePerl can be found as Apache::ePerl on cpan or 
http://www.engelschall.com/sw/eperl/ . I wouldnt know if Engelschall is 
on this list but if he is - feedback would be highly appreciated :). 
Also I wonder whether it has been abandoned or renamed since nothing has 
changed since 02-08-1998 (8th Feb ??). The latest version isnt on CPAN 
either.



Mithun