compiler warnings dont show up 
Author Message
 compiler warnings dont show up

let's say i run this script on my virtual server:

use warnings;
print "Content-type:text/html\n\n";
print "hi there";
$ix  = 3
print $ix;

i've fogotten a semicolon so when i run it through the interpreter it gives
me a compile error.  however wheni run it off my server (running windows
nt), it simply tells me that the script produced no outptu.

this is presumably because compilation is aborted before I print the header.
how can i write this script in such a way that all compile errors are
output?

--
Cheers,
Bill

Pessimism makes life a whole lot easier.

http://www.*-*-*.com/



Sun, 05 Dec 2004 09:11:05 GMT  
 compiler warnings dont show up
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



Quote:
> let's say i run this script on my virtual server:

> use warnings;
> print "Content-type:text/html\n\n";
> print "hi there";
> $ix  = 3
> print $ix;

> i've fogotten a semicolon so when i run it through the interpreter it
> gives me a compile error.  however wheni run it off my server (running
> windows nt), it simply tells me that the script produced no outptu.

> this is presumably because compilation is aborted before I print the
> header. how can i write this script in such a way that all compile
> errors are output?

Look up CGI::Carp.  Especially look at the fatalsToBrowser and set_message
functions.

- --
Eric
print scalar reverse sort qw p ekca lre reh
ts uJ p, $/.r, map $_.$", qw e p h tona e;

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>

iQA/AwUBPQ/mmWPeouIeTNHoEQLyrwCfd1ON/snHSAAAQKQzgAvSH6b9egkAoKlh
UjbnL1rg3y9wqhFnM5+571+H
=DdN8
-----END PGP SIGNATURE-----



Sun, 05 Dec 2004 09:59:29 GMT  
 compiler warnings dont show up
many, many, many thanks.  it worked.

--
Cheers,
Bill

Pessimism makes life a whole lot easier.

http://www.batkins.com/


Quote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1



> > let's say i run this script on my virtual server:

> > use warnings;
> > print "Content-type:text/html\n\n";
> > print "hi there";
> > $ix  = 3
> > print $ix;

> > i've fogotten a semicolon so when i run it through the interpreter it
> > gives me a compile error.  however wheni run it off my server (running
> > windows nt), it simply tells me that the script produced no outptu.

> > this is presumably because compilation is aborted before I print the
> > header. how can i write this script in such a way that all compile
> > errors are output?

> Look up CGI::Carp.  Especially look at the fatalsToBrowser and set_message
> functions.

> - --
> Eric
> print scalar reverse sort qw p ekca lre reh
> ts uJ p, $/.r, map $_.$", qw e p h tona e;

> -----BEGIN PGP SIGNATURE-----
> Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>

> iQA/AwUBPQ/mmWPeouIeTNHoEQLyrwCfd1ON/snHSAAAQKQzgAvSH6b9egkAoKlh
> UjbnL1rg3y9wqhFnM5+571+H
> =DdN8
> -----END PGP SIGNATURE-----



Sun, 05 Dec 2004 21:09:02 GMT  
 compiler warnings dont show up


[...]

Quote:
> i've fogotten a semicolon so when i run it through the interpreter it
gives
> me a compile error.  however wheni run it off my server (running windows
> nt), it simply tells me that the script produced no outptu.

> this is presumably because compilation is aborted before I print the
header.
> how can i write this script in such a way that all compile errors are
> output?

See "perldoc -q better":
  How can I get better error messages from a CGI program?

jue



Mon, 13 Dec 2004 03:13:14 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. ActiveState's perl compiler errors or warning?

2. Compiler Warnings

3. Minor warning/bug: s2p Perl 5.003, Solaris 2.5.1 Sun cc 3.0 compiler

4. Compiler Warnings -- What do these mean?

5. warnings::register, no warnings, and inheritance

6. perl5 warnings (and not perl4 warnings)

7. Pop Ups

8. UPS calculation problem using qcostcgi.cgi script.

9. Looking for a Perl compiler: Yes Compiler

10. New module UPS::Nut

11. UPS shipping code???

12. UPS shipping API problems

 

 
Powered by phpBB® Forum Software