Skip Menu |

This queue is for tickets about the WebService-Validator-HTML-W3C CPAN distribution.

Report information
The Basics
Id: 8269
Status: resolved
Priority: 0/
Queue: WebService-Validator-HTML-W3C

People
Owner: Nobody in particular
Requestors: smylers [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.03
Fixed in: (no value)



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
[guest - Sat Nov 6 05:13:40 2004]: Show quoted text
> Hello there -- thank you very much for this module; it's very useful, > and I'm glad you've written and released it.
cheers Show quoted text
> 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.
Right, all this should be fixed now. In order to solve this the errors method will fetch the required XML if you've not set detailed although it will issue a warning to let you know it's doing this. This is all in 0.05 which should hit CPAN soonish. cheers Struan