Closed frioux closed 9 years ago
Right now I think that users should use the module as documented. If they don't they are responsible for the problems they get. If more users run into such problems I might change my mind to check if the user input makes any sense. Alternatively you could contact the author of File::Path so that he provides the path as string by overloading the "" operator.
Sometimes I use IO::All or Path::Class file objects. I accidentally passed one in to IO::Socket::SSL as an SSL_ca_file (indirectly, via Net::Async::HTTP) and end up getting really strange errors.
Here's some code:
Here's output:
Similarly:
results in
I'm not saying that I think that I think you should support these objects at all, I just think it would be nice to get a more sensible error message.
For what it's worth, this applies to all of the
_file
type args, not just the ca one.So if you can comment on how you'd like it to work, I'd gladly make a patch, but I don't want to work on a patch that does too much etc.