Hmm.  By the time I'd knocked most of the errors down (and before I read
your reply), the browser started giving 500 after all, and the errors were
being duly logged.

So just for kicks, I commented out all the my()'s that I'd added, then added
your line, and it didn't seem to make any difference to the original hang.
Ah well.  Thanks anyway!

Now I have another Q arising out of this.  I have an irreducible pair of
'requires explicit package name' msgs that I can't see how to fix.  One
example is:-

...perl perl perl
require 'bunch_of_constants.pl';
...perl perl perl
$html .= <<EOF;
...html html html
<form action="$one_constant" target="_blank" method="POST" name="Data
Request" onSubmit="...">
...html html html
EOF

$one_constant is defined in bunch_of_constants.pl, which is in the path all
right, and which is not a package.  I've tried
bunch_of_constants::$one_constant and main::$one_constant, but neither
achieved anything.

What do I now need to change?

Rgds, GStC.


-----Original Message-----
From: Randy W. Sims [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 13, 2005 6:59 PM
To: Graeme St. Clair
Cc: beginners-cgi@perl.org
Subject: Re: Use Strict

Graeme St. Clair wrote:
> In accordance with The Rules, I added use strict & use warnings to a 
> script invoked from a browser page on the same machine.  Last time I 
> did this, as soon as I used the browser page, Apache 'error.log' 
> promptly showed scads of msgs along the lines of '[Wed Dec 08 11:03:52 
> 2004] [error] [client ###.###.###.###] Global symbol "$dbh" requires 
> explicit package name at c:\PROGRA~1\...\###.pl line 358.'  This time, 
> all that happened was that the browser (IE, alas) walloped off into a 
> loop (maybe) and nothing new ever came up in the new frame, although there
did seem to be disk activity.
>  
> I eventually elicited a list of error msgs by just flat out compiling 
> the thing from the Windows cmd line, but is there something more 
> intelligent I could have done to force out some diagnostics on the Apache
log?

use CGI::Carp qw( fatalsToBrowser );

See `perldoc CGI::Carp`

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to