- From: Ville Skyttä <ville.skytta@iki.fi>
- Date: Sat, 15 Jan 2005 14:10:44 +0200
- To: Donny Viszneki <smirk@thebuicksix.com>
- Cc: www-validator@w3.org
On Wed, 2005-01-12 at 01:53 -0500, Donny Viszneki wrote: > # Temporary filehandles. > my $spin = IO::File->new_tmpfile; > my $spout = IO::File->new_tmpfile; > my $sperr = IO::File->new_tmpfile; > > # Testing the $spin variable > if ( not $spin ) { print STDERR "spin seems to not exist\n"; } > > Surely enough, Apache's error log looks like this after an invocation > of the script as per the URL provided earlier: > > spin seems to not exist > [Wed Jan 12 01:45:19 2005] check: Can't use an undefined value as a > symbol reference at > /opt/local/share/w3c-markup-validator/httpd/cgi-bin/check line 706. Weird... it looks like IO::File->new_tmpfile is unable to create a temporary file then. Unfortunately no more info seems to be available for debugging the failure further from IO::File or elsewhere :( Something to try out (untested): Add this somewhere at the top of the file where other "use foo" statements are: use File::Temp qw(tempfile); Then, replace all IO::File->new_tmpfile occurrences in the script with tempfile(), eg: my $spin = tempfile(); my $spout = tempfile(); my $sperr = tempfile(); If that fails too, some kind of error messages should be in the Apache error log. Let us know how it goes.
Received on Saturday, 15 January 2005 12:10:46 UTC