develooper Front page | perl.perl5.porters | Postings from July 2014

[perl #122005] deprecate POSIX::tmpnam

Thread Next
From:
Tony Cook via RT
Date:
July 22, 2014 02:02
Subject:
[perl #122005] deprecate POSIX::tmpnam
Message ID:
rt-4.0.18-15149-1405994546-1268.122005-15-0@perl.org
On Sun Jun 01 06:27:39 2014, jhi wrote:
> The tmpnam() interface is known to be dangerous enough that compilers
> and even linkers warn against its use.  And POSIX.pod advises
> likewise.
> 
> Therefore, POSIX extension probably should stop giving access to the
> raw
> tmpnam().
> 
> Some options:
> 
> (1) remove it, let users (*) die
>  (2) implement it using mkstemp() if available.  (What about platforms
>  that have tmpnam() but do not have mkstemp()?)  This reimplementing,
> of
>  course, is already done (and much more) in File::Temp, but we
> probably
> don't want the POSIX being dependent on File::Temp.
> 
> Both options above can include "add a loud obnoxious warning".
> 
> (*) http://grep.cpan.me/?q=POSIX.*tmpnam

(3) produce a deprecation warning, patch attached.

Tony

---
via perlbug:  queue: perl5 status: new
https://rt.perl.org/Ticket/Display.html?id=122005

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About