Contrary to what is written in the documentation, selfie does not return a File::Temp object, but just a filehandle. The difference between both is that for example the filename method is not available for the latter (which would be quite handy for some kind for things like system("display", $selfie->filename) without the need to create another temporary file).
It seems that a real File::Temp may be created using the following (no other code changes needed):
Contrary to what is written in the documentation,
selfie
does not return aFile::Temp
object, but just a filehandle. The difference between both is that for example thefilename
method is not available for the latter (which would be quite handy for some kind for things likesystem("display", $selfie->filename)
without the need to create another temporary file).It seems that a real
File::Temp
may be created using the following (no other code changes needed):(I can create a formal PR if this problem is accepted)