How to open temporary with Perl 5.6?
am 24.09.2007 18:28:37 von Thomas DornerHi,
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!