Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Path-Tiny CPAN distribution.

Report information
The Basics
Id: 83064
Status: resolved
Priority: 0/
Queue: Path-Tiny

People
Owner: Nobody in particular
Requestors: ribasushi [...] leporine.io
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: spew() tempfile not thread safe
Different threads will have the same $$, with all the hilarity ensuing. https://metacpan.org/source/DAGOLDEN/Path-Tiny-0.001/lib/Path/Tiny.pm#L294
Thank you. Let me know if you think this is sufficient: https://github.com/dagolden/path-tiny/commit/ed750fef087c117316f11557a5aab1ee30e9fc91
Subject: Re: [rt.cpan.org #83064] spew() tempfile not thread safe
Date: Thu, 31 Jan 2013 23:25:37 +1100
To: David Golden via RT <bug-Path-Tiny [...] rt.cpan.org>
From: Peter Rabbitson <ribasushi [...] cpan.org>
On Thu, Jan 31, 2013 at 06:01:18AM -0500, David Golden via RT wrote: Show quoted text
It should be for the cases I can think of, but it makes me wonder why you just don't grab a "classic" tempfile with a template based on the original name (thus same dir and all). But yes - what you have above will suffice.
On Thu Jan 31 07:25:50 2013, RIBASUSHI wrote: Show quoted text
> It should be for the cases I can think of, but it makes me wonder why > you just don't grab a "classic" tempfile with a template based on the > original name (thus same dir and all).
I think I was just copying from File::Slurp and didn't think about it. Though I'm glad to avoid all the rand() calls to fill in the template.