X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f Newsgroups: comp.lang.perl.misc,comp.os.msdos.djgpp Subject: Re: Perldoc error: "Could not create temp file" From: "A. Sinan Unur" <1usa AT llenroc DOT ude DOT invalid> References: Organization: Cornell University Message-ID: User-Agent: Xnews/2006.08.24 Lines: 83 NNTP-Posting-Host: b5ab1a282a9d1976241c2ff5d914fb14 X-Complaints-To: abuse AT worldnet DOT att DOT net X-Trace: bgtnsc05-news.ops.worldnet.att.net 1208461500 b5ab1a282a9d1976241c2ff5d914fb14 (Thu, 17 Apr 2008 19:45:00 GMT) NNTP-Posting-Date: Thu, 17 Apr 2008 19:45:00 GMT Date: Thu, 17 Apr 2008 19:45:00 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com "Robbie Hatley" wrote in news:CuSdnZLhluU2BZrVnZ2dnUVZ_oaonZ2d AT giganews DOT com: > > "A. Sinan Unur" wrote: >> On a hunch, could you check what the following script prints: >> >> #!/usr/bin/perl >> >> use strict; >> use warnings; >> >> use Fcntl; >> >> my $EXLOCK = eval { >> local $SIG{__DIE__} = sub {}; >> local $SIG{__WARN__} = sub {}; >> &Fcntl::O_EXLOCK(); >> }; >> >> print "'$EXLOCK'\n"; >> >> __END__ > > Hmmm. That gives: > > cwd = C:\ > $p einval.p > Use of uninitialized value in concatenation (.) or string at > C:\scripts\einval.p line 14. > '' > So it's just printing '', since $EXLOCK is uninitialized. > Whatever that indicates. I'm afraid its going way over my head. That indicates that the problem flag is one of the other ones. Here is my guess, File::Temp is OK, but Pod::Perldoc only seems to check and take care of the shortcomings of Win32. However, the same shortcomings exist in DJGPP running on Win32 as well. I did look at MSWin_perldoc_tempfile in Perldoc.pm and it looks like the DJGPP would need special handling as well. The only Win32 specific part of the special handling seems to be getting the tick count for generating a unique filename. I don't have a DJGPP environment set up right now so I can't test a patch, but, if you don't care much about filenames being unguessable, replacing the filename generation algorithm to something along the lines of sub DJGPP_perldoc_tempfile { # skip, see sub MSWin_perldoc_tempfile # completely untested my $ext = 'aaa'; do { # used also in MSWin_temp_cleanup $spec = catfile( $tempdir, sprintf( 'pd%6.6x.%s', time & 0x00ffffff, $ext ), ); ++ $ext; } while ( -e $spec ); Alternatively, you can try UNLINK => 0 and see if it solves you immediate problem. Sorry, I can't investigate this any further without setting up a DJGPP environment. Sinan -- A. Sinan Unur <1usa AT llenroc DOT ude DOT invalid> (remove .invalid and reverse each component for email address) comp.lang.perl.misc guidelines on the WWW: http://www.rehabitation.com/clpmisc/