From: gv@... (Gerard A.W. Vreeswijk) Date: 2003-07-07T18:36:26+09:00 Subject: Re: trapping compile time errors On Mon, 7 Jul 2003 17:19:26 +0900, Brian Candler wrote: >On Mon, Jul 07, 2003 at 05:15:45PM +0900, Gerard A.W. Vreeswijk wrote: >> I want to catch compile time errors with my own method. >.. >> Eventually, >> I came up with the following, which is not as I imagined. It's ugly. > >It's correct though - need an 'eval' because you must have a working >(syntactically-valid) program A to report the error, before attempting to >compile invalid program B. Allright. This is good. Still, I hope it is possible to report syntax errors other than by eval. Or am I aiming for the impossible? (In Perl it is possible anyway.) Why I want it is to report all errors including syntax to the browser. Such errors must always be preceded by a "Content-type: text/html\n\n" I don't want to use the CGI module, because I consider this to be overkill for the small script I am writing.