Subject: | Use of uninitialized value $hunks in join or string |
I use String::Errf as part of our exception objects (similar to Throwable::X). If I throw an
exception that doesn't include all the fields in the payload as are named in the message formats,
I get this warning. The most annoying part is that in the exceptions, I get the warning in the
catching code well away from where the potential warning was actually caused.
On the other hand, I don't know what a "better" solution is. The uninitialized warning really is
legitimate. Replacing it with an empty string or something else might be worse.
Perhaps String::Formatter needs a way to configure undef handling for the generated
subroutines. If that's done, though, I don't know what String::Errf ought to do, but then I could
at least use my own String::Errf-like String::Formatter that handled undef the way I want it to.
Cheers.