Skip Menu |

This queue is for tickets about the kurila CPAN distribution.

Report information
The Basics
Id: 39783
Status: open
Priority: 0/
Queue: kurila

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

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

Subject: Recursive hash lock/unlock functions are noisy
Download (untitled) / with headers
text/plain 680b
In Hash::Util the functions for locking and unlocking multi-level hashes produce gobs of "Use of uninitialized value" warnings: use Hash::Util; my %h = (a => {b => 'c'}); Hash::Util::lock_hash_recurse(%h); Hash::Util::unlock_hash_recurse(%h); __END__ Use of uninitialized value in string eq at .../Hash/ line 323. Use of uninitialized value in string eq at .../Hash/ line 335. The code on both of the offending lines is the same: if (reftype($value) eq 'HASH') { reftype() returns undef for non-reference values (the 'c' in the above example) which triggers the warning. The obvious fix is to precede the reftype checks with no warnings 'uninitialized';
Download (untitled) / with headers
text/plain 432b
Additional notes: Although this bug seems minor, I consider it fairly important. Because of these spurious warnings (particularly the sheer number of them) I don't dare use these functions in any code that I'd distribute to end users. The only ways to suppress the warnings are: 1) Use the -X option on the shebang line, which is would obliterate *all* warnings. 2) Wrap the function calls in code that closes and restores STDERR.
Ack. Forgot an option: 3) local $SIG{__WARN__} = sub {};

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

Please report any issues with to