You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mimeinfo tries to catch people wrongly passing it a file handle rather than a file name, but in doing so it also blocks reasonable uses of supplying a file name as an object (which stringifies to the name):
$ perl -MPath::Tiny -MFile::MimeInfo -wE 'say mimetype path q[whamm.mp3]'
You should use File::MimeInfo::Magic to check open filehandles at -e line 1.
This thwarts the use of popular modules such as Path::Class and Path::Tiny, used to manipulate paths.
Please can you either remove this check (and presume the caller knows what she's doing) or refine it to let through objects that stringify. Thanks.
The text was updated successfully, but these errors were encountered:
Are you kidding me? I ♥ Path::Tiny! I use it all the time.
I guess I don't use File::MimeInfo all that often...
I removed the check you called 'overzealous' and added a unit test to make sure Path::Tiny objects are not a problem. New release will be on its way to CPAN after travis tests are OK.
mimeinfo
tries to catch people wrongly passing it a file handle rather than a file name, but in doing so it also blocks reasonable uses of supplying a file name as an object (which stringifies to the name):$ perl -MPath::Tiny -MFile::MimeInfo -wE 'say mimetype path q[whamm.mp3]' You should use File::MimeInfo::Magic to check open filehandles at -e line 1.
This thwarts the use of popular modules such as
Path::Class
andPath::Tiny
, used to manipulate paths.Please can you either remove this check (and presume the caller knows what she's doing) or refine it to let through objects that stringify. Thanks.
The text was updated successfully, but these errors were encountered: