Closed chrisjrob closed 8 years ago
I added WWW::Shorten::UserAgent as I thought it was easier to throw an exception (aka "die") than dealing with returning error values through a stack of subroutine calls.
It's easy enough to stop your program from dying at that point. Use something like Try::Tiny (as the shorten
example program does) or by using eval
and then checking $@
.
Thank you very much for your response. Eval is working fine.
Seems to be the fault of WWW::Shorten::generic which is using WWW::Shorten::UserAgent, which seems to be designed explicitly to die on service errors, rather than using LWP::UserAgent presumably?
Not sure if that's a bug or as per design - but not ideal for server programs to die when there's a service interruption?