I started using Mojo::IRC and noticed it seemingly not getting any data, even under DEBUG. Turns out the goofball server I was talking to only emits \n, so Mojo::IRC::_read was failing to match. I added square brackets around the closing \r\n to allow either and life is good. All existing tests pass.
I added a link to the relevant bit of IRC spec by way of reference (I imagine you guys have spent a lot of time with this document, I just didn't want this hack to seem entirely unfounded :))
Unfortunately, due to backward compatibility requirements ... any LF or CR anywhere in a message marks the end of that message (instead of requiring CR-LF);
Happy to do any cleanup you'd like, I'd love to use Mojo::IRC for this quick project of mine!
LGTM. I've asked @kanatohodets to also change Test::Mojo::IRC to not care about "\r". That way if all the unit tests still go through, we should be good to go.
I started using
Mojo::IRC
and noticed it seemingly not getting any data, even underDEBUG
. Turns out the goofball server I was talking to only emits\n
, soMojo::IRC::_read
was failing to match. I added square brackets around the closing\r\n
to allow either and life is good. All existing tests pass.I added a link to the relevant bit of IRC spec by way of reference (I imagine you guys have spent a lot of time with this document, I just didn't want this hack to seem entirely unfounded :))
Happy to do any cleanup you'd like, I'd love to use Mojo::IRC for this quick project of mine!