Subject: | Documentation of ->errors Method |
Hello there -- thank you very much for this module; it's very useful, and I'm glad you've written and released it.
However I had to read the source code to get it working properly, in particular the ->errors method, so I think the docs could do with a little tweaking.
Firstly ->errors relies on ->_content, which only gets set if the request method is not HEAD, which only happens if the detailed attribute gets passed to the constructor. Without this ->errors yields an error from XML::XPath, which is a little confusing.
Please could ->new(detailed => 1) be documented so that people can find this? Also, perhaps ->errors could check for it, and not try to invoke XML::XPath if there isn't any content, giving an error message instead?
Finally in the synopsis ->errors is shown returning a list, whereas it actually returns an array ref which needs dereferencing for iterating over.
Best wishes.
Smylers