When you create a File::Temp object, the object is actually an open file handle:
use feature 'say';
use File::Temp;
use Scalar::Util qw/ openhandle /;
my $tmp = File::Temp->new;
say openhandle($tmp); # returns a true value
but the file seems to be closed when creating one through Path::Tiny:
use feature 'say';
use Path::Tiny;
use Scalar::Util qw/ openhandle /;
my $path = Path::Tiny->tempfile;
my $tmp = $path->cached_temp;
say openhandle($tmp); # should be true, but returns undef
When you create a File::Temp object, the object is actually an open file handle:
but the file seems to be closed when creating one through Path::Tiny: