X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=t%2Fcompat.t;h=daba215626f1c3c3a78abc918112ec4bb9539954;hb=156f9d09e37c5162f39d19bd7a3e5f6865325516;hp=9aa8efca0dbfb1f829fd0892777ae9923c29381a;hpb=3797cda1b0da9caa24c7ff35e910e1f318c77918;p=term-progressbar.git diff --git a/t/compat.t b/t/compat.t index 9aa8efc..daba215 100644 --- a/t/compat.t +++ b/t/compat.t @@ -35,8 +35,9 @@ BEGIN { sub grab_output($) { die 'usage: grab_stderr(string to eval)' if @_ != 1; my $code = shift; - require POSIX; - my $tmp_o = POSIX::tmpnam(); my $tmp_e = POSIX::tmpnam(); + use File::Temp qw(tempdir); + my $dir = tempdir( CLEANUP => 1 ); + my $tmp_o = "$dir/out"; my $tmp_e = "$dir/err"; local (*OLDOUT, *OLDERR); # Try to get a message to the outside world if we die