All other callbacks are async but this one appears to need to require to run synchronously or this line will fail:<div><br></div><div>+ return $self->stream_error("unsupported-stanza-type") unless $class;<br><br>
</div><div>At minimum you should document in HookDocs.pm that the provided callback can't defer running the callback into the future.</div><div><br></div><div>Also, document this line:</div><div><br></div><div> sub { },</div>
<div><br></div><div>That's the fallback, if I recall correctly? How about this instead:</div><div><br></div><div> sub {</div><div> # as last-resort, do nothing. check below will fail with unsupported stanza type.</div>
<div> },</div><div><br></div><div>Same code, but easier to read.</div><div><br></div><div>Fix those and feel free to commit without another review. (also update ChangeLog)</div><div><br>On Mon, Nov 3, 2008 at 11:38 AM, <span dir="ltr"><<a href="mailto:igotimac@gmail.com">igotimac@gmail.com</a>></span> wrote:<div>
<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Code review tool couldn't parse my last patch, trying again<div><div></div><div class="Wj3C7c">
<br>
<br>
<a href="http://codereview.appspot.com/2404" target="_blank">http://codereview.appspot.com/2404</a><br>
</div></div></blockquote></div><br></div></div>