In Lintian::Relation, return 0 for boolean FALSE only in public methods returning truth values.
Using undef to indicate boolean FALSE can have unintended consequences. For details, please see Bug#943724. Some of the routines in this file return one of the three states 1, 0 and undef. This is presumably done to make the code more efficient. The most notable example here is implies_element, but also implies_array and the inverse subroutines for both. To return 0 instead of undef would be an error. Instead, only the public-facing interface, which obviously means to deliver boolean values, is modified. In the case of Relation::visit, force scalar context. Otherwise the regular expression in the 'matches' routine above it could return undef. All other users also expect boolean values, judging from the POD for visit. Gbp-Dch: ignore
Loading
Please register or sign in to comment