How to open temporary with Perl 5.6?
- From: Thomas Dorner <nospam.comp.lang.perl.modules.070924@xxxxxxxxxxxxxxxxxx>
- Date: 24 Sep 2007 18:28:37 +0200
Hi,
in the test suite of one of my modules I use
open TMP, '+>', undef or die ...
to open a temporary file which is more or less as it is documented in
my Perl 5.8.8 documentation:
As a special case the 3-arg form with a read/write mode and the
third argument being "undef":
open(TMP, "+>", undef) or die ...
opens a filehandle to an anonymous temporary file.
Now I received my first test error from the CPAN testers for that
statement:
Use of uninitialized value in open at t/Parse-Readelf.t line 45.
The tester runs Perl 5.6.2, so I suppose the temporary functionality
was added later. Now my questions would be:
Which Perl version added the special temporary syntax?
Is there some other portable easy-to-use construct to open a temporary
file with Perl versions 5.6.1 or later?
Regards, Thomas
--
Address is not read, Reply-To address is only valid for two months!
.
- Prev by Date: Re: RFC: Crypt::Skip32 [try 3]
- Next by Date: Compile problem: Curses::Widgets
- Previous by thread: RFC: Crypt::Skip32 [try 3]
- Next by thread: Compile problem: Curses::Widgets
- Index(es):
Relevant Pages
|
|