CGI::Carp qw(fatalsToBroswer); question

2002-07-10 Thread Wes Cravens

use CGI::Carp qw(fatalsToBrowser); was having no effect on my modules.

Changing a line in CGI::Carp
 sub ineval { $^S || _longmess() =~ /eval [\{\']/m }
---
 sub ineval { _longmess() =~ /eval [\{\']/m }

,by advise from a mail I found in archives from last year, produced the
results that I was expecting from fatalsToBrowser.

The __DIE__ handler: die() then defaults to standard CORE::die if ineval
returns True, not producing the desired results of presenting error back to
client.

I suspect that this has somthing to do with mod_perl/apache wanting the
return status of the modules and wrapping them all up in a nice cosey
blanket.

Are there any solutions to this problem that don't involve changing
CGI::Carp?  Perhaps I should just rip the code that I want out of CGI::Carp?

Kind Regards,

Wes Cravens


Rev. FPCED(UK)
 y n=-09hu6+40563
2136+-*+96,
3.-/n*+963.h




Re: CGI::Carp qw(fatalsToBroswer); question

2002-07-10 Thread mike808

 Changing a line in CGI::Carp
  sub ineval { $^S || _longmess() =~ /eval [\{\']/m }
 ---
  sub ineval { _longmess() =~ /eval [\{\']/m }

 Are there any solutions to this problem that don't involve changing
 CGI::Carp?  Perhaps I should just rip the code that I want out of CGI::Carp?

Why not just pull in CGI::Carp and then have some code like:
  # Redefine whatever subs we want to directly in the CGI::Carp package
  # Just don't expect LDS to support this... :=)
  use CGI::Carp;
  sub CGI::Carp::ineval { _longmess() =~ /eval [\{\']/m }

I've done the same for many a change to CGI.pm to fix some nits I've run across.

Mike808/

-
http://www.valuenet.net