I would have just said $retry and then gone on to document each of the
parameters including what type they should be... and of course a "croak XXX
unless ref($retry) eq 'CODE'" before doing any real work.

On Tue, Dec 7, 2010 at 2:12 PM, David Nicol <davidni...@gmail.com> wrote:

> The pod for AnyEvent::Handle contains <<SNIP
>
> on_connect => $cb->($handle, $host, $port, $retry->())
> This callback is called when a connection has been successfully
> established.
>
> The peer's numeric host and port (the socket peername) are passed as
> parameters, together with a retry callback.
> SNIP
>
> Is C<$retry->()> the best way to represent that a coderef is required
> there? It's clear, but I would have written it C<\&retry>. And I would
> have written something confusing.
>
> I think Marc Lehmann has done it the right way.
>



-- 
Check out my LEGO blog at http://www.brickpile.com/
View my photos at http://flickr.com/photos/billward/
Follow me at http://twitter.com/williamward

Reply via email to