delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2008/04/17/03:30:38

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: <zd6dnbRZ8J5AdJvVnZ2dnUVZ_rignZ2d AT giganews DOT com>
Organization: Cornell University
Message-ID: <Xns9A8321CB0C79asu1cornelledu@127.0.0.1>
User-Agent: Xnews/2006.08.24
Lines: 65
NNTP-Posting-Host: 42a8d988df5add7eef6a2edf404db2a8
X-Complaints-To: abuse AT worldnet DOT att DOT net
X-Trace: bgtnsc04-news.ops.worldnet.att.net 1208416759 42a8d988df5add7eef6a2edf404db2a8 (Thu, 17 Apr 2008 07:19:19 GMT)
NNTP-Posting-Date: Thu, 17 Apr 2008 07:19:19 GMT
Date: Thu, 17 Apr 2008 07:19:19 GMT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

"Robbie Hatley" <lonewolf AT well DOT com> wrote in
news:zd6dnbRZ8J5AdJvVnZ2dnUVZ_rignZ2d AT giganews DOT com: 

> wd=C:\djgpp\bin
> %bash
> bash-2.04$ perldoc perl
> Error in tempfile() using c:/djgpp/tmp/XXXXXXXXXX: Could not
> create temp file c: /djgpp/tmp/zkQ06tqlcH: Invalid argument
> (EINVAL) at /dev/env/DJDIR/lib/perl5/Pod /Perldoc.pm line 1483
> bash-2.04$ exit
> exit
> wd=C:\djgpp\bin
> %perl perldoc perl
> Error in tempfile() using C:/TEMP/XXXXXXXXXX: Could not create
> temp file C:/TEMP /0mfgo64w9W: Invalid argument (EINVAL) at
> /dev/env/DJDIR/lib/perl5/Pod/Perldoc.p m line 1483
> wd=C:\djgpp\bin
> %

You have a permissions problem. Either c:\djgpp\tmp does not exist or 
you do not have permissions to write there. Same applies to 
C:\TEMP

I did use DJGPP for a long time. However, unless you really are doing
DOS development, I see very little point in trying to make do with 
Perl in the DOS environment.

>   return File::Temp::tempfile(UNLINK => 1); ######### LINE 1483
>   ######### 
> 
> So, why would the parameters of File::Temp::tempfile be "invalid"?
> And what the heck is "UNLINK"?  That doesn't look like a variable.

No, the fat comma, =>, automatically quotes a bare string consisting 
only of \w characters. Therefore, the statement above is identical to

return File::Temp::tempfile('UNLINK', 1);

> I'm getting this problem both on my computer at work, and here at
> home. Both computers are running MS Windows 2000, and both are
> using djgpp and Perl version 5.8.8 .
> 
> I tried changing environment variable "tmpdir" to "C:\Temp", but I
> get that same "Invalid argument on line 1483" error.

If I remember correctly, there was problem where DJGPP tools were not 
seeing the proper TEMP directory .. ah, yes, here is something that 
might be useful:

http://groups.google.com/group/comp.os.msdos.djgpp/msg/ec8ac77e5e94a579

> 
> I'm not sure if this is a Perl issue or a djgpp issue (or both),
> so I'm posting this in both comp.lang.perl.misc and
> comp.os.msdos.djgpp . 
> 

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019