[Catalyst] "Use of uninitialized value $buffer" error

Merlyn Kline merlyn at zynet.net
Wed Jul 1 09:11:47 GMT 2009

> What are people's thoughts about adding a specific warning if you try
> to write undef? (As you could still cause this warning by doing that
> explicitly)

Depends why you might do this - if it's legitimate (e.g. to force the
headers to be flushed?) then it should be handled silently. Otherwise, a
warning would seem sensible.

I guess this is linked to the other thing I mentioned - the code here seems
to just prepend the headers to the buffer but the headers are not (supposed
to be?) UTF8 encoded whereas the buffer probably is so confusion can ensue.
That's why I originally called write with no params (to flush the unencoded
headers and work around that problem) and so recognised the symptom. As I
said before though, that was all with rather an old Catalyst and I don't
know the current state of play WRT all that.


More information about the Catalyst mailing list