> I am on a Win32 system, and I use the fatalsToBrowser to prompt errors > with some scripts. However, the error mesg will also prompt where exactly > the file(script) is located. In case, I don't want the full path is > exposed. Can I modify sth , perhaps regex s///, to mask the root path ? > > like : > File not found : html/log/connie.txt at C:\WWWroot\CGI-ALL\index.pl line > 12. > > is better be masked as : > File not found : html/log/connie.txt at /index.pl line 12. > > Is that possible ?
Interesting... Looking at the CGI::Carp source, there seems to be some undocumented functionality. It looks like you can define a variable $CGI::Carp::CUSTOM_MSG, which can either be a message or a coderef. I haven't tested this, but by the looks of things something like this might work for you: ,----[ code ] | use CGI::Carp qw(fatalsToBrowser); | BEGIN { | $CGI::Carp::CUSTOM_MSG = sub { | my $msg = shift; | $msg =~ s/C:\WWWroot\CGI-ALL//; | | print STDOUT $msg; | }; | } `---- As I said, untested, and undocumented as far as I can see. So who knows if it'll actually work. Thanks, Daniel -- Just wanna dance the night away With senoritas who can sway -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]