I have always felt the exception handling was a bit inconsistent. But glad the inconsistency was actually useful for you since the getprint handling was what you needed. You could also maybe getstore to a File::Temp temporary file path so you don't have to affect the global selected output handle.
The reason getprint and getstore can return the HTTP status is because they don't need to return the content they retrieved. Trying to have get return anything more complicated strays a bit too far from "Simple". There's always the option to just use HTTP::Tiny yourself, the source of get and head are pretty small and should point you in the right direction.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I have always felt the exception handling was a bit inconsistent. But glad the inconsistency was actually useful for you since the
getprint
handling was what you needed. You could also maybegetstore
to a File::Temp temporary file path so you don't have to affect the global selected output handle.The reason
getprint
andgetstore
can return the HTTP status is because they don't need to return the content they retrieved. Trying to haveget
return anything more complicated strays a bit too far from "Simple". There's always the option to just use HTTP::Tiny yourself, the source ofget
andhead
are pretty small and should point you in the right direction.