Skip Menu |

This queue is for tickets about the HTML-ParseBrowser CPAN distribution.

Report information
The Basics
Id: 101742
Status: new
Priority: 0/
Queue: HTML-ParseBrowser

Owner: Nobody in particular
Requestors: NGLENN [...]

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

Subject: AUTOLOAD is confusing
Download (untitled) / with headers
text/plain 956b
The way AUTOLOAD is used, you can't tell if a piece of information will be available at run-time without inspecting the contents of the object's blessed hash. The AUTOLOAD implementation returns undef if a method name is not recognized or a piece of information was not retrieved during parsing, but the caller won't know which is which. Additionally, there is no can() implementation. There are some options for fixing this: - Change AUTOLOAD to accept only a list of possible method names (v, major, minor, osvers, etc.), and throw an error otherwise. Implement can() separately as shown here ( - Get rid of AUTOLOAD and use Class::Tiny or another system to generate the getters. - Get rid of AUTOLOAD and generate the getters manually.(; added bonus of not adding any new dependencies. - Get rid of AUTOLOAD and just write normal methods. This is long-winded, but clear.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to