Skip Menu |
 

This queue is for tickets about the Params-Check CPAN distribution.

Report information
The Basics
Id: 69626
Status: resolved
Worked: 1 hour (60 min)
Priority: 0/
Queue: Params-Check

People
Owner: BINGOS [...] cpan.org
Requestors: djerius [...] cpan.org
Cc:
AdminCc:

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



Subject: Params::Check doesn't always croak if WARNINGS_FATAL is set
Download (untitled) / with headers
text/plain 999b
Hi, If I set WARNINGS_FATAL, Params::Check doesn't always croak upon error. There are two points in the check() subroutine with unguarded simple returns: 249 250 ### did we get the arguments we need? ### 251 return if !$utmpl or !$href; 252 268 ### sanity check + defaults + required keys set? ### 269 my $defs = _sanity_check_and_defaults( $utmpl, $args, $verbose ) 270 or return; 271 Additionally, the checks at line 251 are performed before clear_error() is called, so last_error() will return any errors from a previous call, not the current one. This makes reporting an error more complicated: The checks at line 251 must be duplicated in user code because if the checks have failed last_error() can't be trusted (an incorrect error message may be reported). As not all errors are thrown if WARNINGS_FATAL=true, there's no point in using exceptions to clean up error code. Thanks! (and thanks for the module) Diab
Download (untitled) / with headers
text/plain 117b
Hi, Thanks for reporting this. I believe that the issue was resolved with the release of version 0.30 Many thanks.


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

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.