in reply to CGI::Carp compilation errors
As a quick and dirty solution (I actually have this in a cgi):
use warnings; use strict; sub pr { print @_, "\n" }; sub pp { print "<P>", @_, "\n" }; sub pb { print "<P><B>", @_, "</B> \n" }; sub pq { my $x= join "", @_; $x=~s!([^a-zA-Z0-9.,:;_\!?\-+*/="'`(){}\[\]\\\\@#\$^~ \n])! sprintf("&#x%x;",ord$1) !ge; $x=~s!^ | (?= |$)! !gm; $x=~s!\n!<BR>!g; print $x, "\n"; } BEGIN { print qq{Content-Type: text/html \nCache-Control: no-cache \n\n <HTML> +}; $SIG{__DIE__}= sub { pb "die "; pq $_[0]; pr "</HTML>"; die $_[0]; }; $SIG{__WARN__}= sub { pp "warn "; pq $_[0]; pr "</P>"; }; };
|
|---|