Subject: | local(*ENTRY) = $val; throws warnings when $val is undef |
In some rare situations, $val can be undefined.
In this case, the code appears to pass the value down through all the other type checks until it reachs the UNKNOWN stuff at the end.
Unfortunately, in new Perls (I think it's mostly just them) the local (*ENTRY) = undef usage throws a warning.
You could simplify the code by checking for undef $val once befire the localisation of *ENTRY, add it immediately to UNKNOWN and then next.
This would have a secondary benefit of letting you remove all of defined $val in the if ( defined $val and something ) lines, which would probably also make the scanning faster (because it only checks for definedness once).
In this case, the code appears to pass the value down through all the other type checks until it reachs the UNKNOWN stuff at the end.
Unfortunately, in new Perls (I think it's mostly just them) the local (*ENTRY) = undef usage throws a warning.
You could simplify the code by checking for undef $val once befire the localisation of *ENTRY, add it immediately to UNKNOWN and then next.
This would have a secondary benefit of letting you remove all of defined $val in the if ( defined $val and something ) lines, which would probably also make the scanning faster (because it only checks for definedness once).