oalders/http-browserdetect — comment on commit 793d06a06c0a03613351c6b7159ab568acae78d4
File:  line 0
By tamias:

See issue #25 for some context.

First, these methods were documented to return undef, but did not do so. Second, these methods were not consistent with older methods, such as browser_string(), which do return undef. Third, in list context, returning nothing and returning undef are very different things. If I do @info = ($bd->device_name, $bd->browser_string, $bd->public_version), I want to know that @info contains three elements. See the perlmonks discussion about this Perl::Critic policy for discussion of exactly this issue. http://perlmonks.org/index.pl?node_id=741847

One could argue that the methods should return empty string rather than undef, but nevertheless before this patch the code was inconsistent and did not match the documentation.