> print STDERR "blah blah blah" is going to the browser but I am not
> really worried about it too much unless it is something I should worry
> about - anyone care to comment on that ?

Printing error messages to the public is a potential security risk, so
you have to decide how paranoid you want to be.  You could change this
behavior by modifying the tied STDERR in Parse::ePerl or maybe in
Apache::ePerl where it prints the message to the browser.

> Ofcourse I still dont understand why die was being trapped out there.

It is being trapped to allow for error reporting and to avoid leaving
the program in an unknown state when a problem occurs.  If you want it
to still work for this but not pick up your eval() calls, you can
replace the __DIE__ handler there with something fancier like this:

local $SIG{__DIE__} = sub {
     my $in_eval = 0;
     for( my $stack = 1;  my $sub = (CORE::caller($stack))[3];
 $stack++ ) {
         $in_eval = 1 if $sub =~ /^\(eval\)/;
     }
     $error .= $_[0] unless $in_eval;
};

This is a slight variation of some Michael Schwern code that Stas posted
a little while ago.

- Perrin


Reply via email to