Subject: | Don't return undef |
Hi there,
Thanks for the useful module.
Methods such as case_components return a hash or undef. However, that leads to this problem:
my %components = $name_parse->case_components;
And that either works or, if we get an undef, results in:
Odd number of elements in hash assignment at
If you use a bare return statement:
return;
# not: return (undef);
Then this warning goes away.
Sadly, our current code is sprinkled with "no warnings" statements to avoid this issue.
Cheers,
Ovid