Skip Menu |

This queue is for tickets about the Linux-Epoll CPAN distribution.

Report information
The Basics
Id: 78077
Status: resolved
Priority: 0/
Queue: Linux-Epoll

People
Owner: Nobody in particular
Requestors: leonerd-cpan [...] leonerd.org.uk
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 0.004
Fixed in: 0.005



Subject: Please document the arguments to the callback functions
Easily discovered from source-diving, but I couldn't see acutally documented in POD what the arugments are to the callback function. Also it would be useful to point towards the Linux::Epoll::Util functions for converting those bitmasks into useful values. Or perhaps just provide constants like IO::Epoll does: $epoll->add($fh, [qw(in out)], sub { my ($event) = @_; if($event & EPOLLIN) { ... } }); -- Paul Evans
Subject: Re: [rt.cpan.org #78077] Please document the arguments to the callback functions
Date: Fri, 29 Jun 2012 13:27:07 +0200
To: bug-Linux-Epoll [...] rt.cpan.org
From: Leon Timmermans <fawaka [...] gmail.com>
On Thu, Jun 28, 2012 at 1:59 AM, Paul Evans via RT <bug-Linux-Epoll@rt.cpan.org> wrote: Show quoted text
> Easily discovered from source-diving, but I couldn't see acutally > documented in POD what the arugments are to the callback function. > > Also it would be useful to point towards the Linux::Epoll::Util > functions for converting those bitmasks into useful values. > > Or perhaps just provide constants like IO::Epoll does: > >   $epoll->add($fh, [qw(in out)], sub { >      my ($event) = @_; >      if($event & EPOLLIN) { ... } >   });
I'm wondering if I shouldn't change that entirely, so that one can do $epoll->add($fh, [qw(in out)], sub { my ($event) = @_; if($event->{in}) { ... } }); It seems more user-friendly to me, and the runtime costs should still be fairly marginal. Leon
CC: leonerd-cpan [...] leonerd.org.uk
Subject: Re: [rt.cpan.org #78077] Please document the arguments to the callback functions
Date: Fri, 29 Jun 2012 15:04:05 +0100
To: Leon Timmermans via RT <bug-Linux-Epoll [...] rt.cpan.org>
From: Paul LeoNerd Evans <leonerd [...] leonerd.org.uk>
On Fri, Jun 29, 2012 at 07:27:39AM -0400, Leon Timmermans via RT wrote: Show quoted text
> I'm wondering if I shouldn't change that entirely, so that one can do > > $epoll->add($fh, [qw(in out)], sub { > my ($event) = @_; > if($event->{in}) { ... } > }); > > It seems more user-friendly to me, and the runtime costs should still > be fairly marginal.
SGTM. Make it so :) -- Paul "LeoNerd" Evans leonerd@leonerd.org.uk ICQ# 4135350 | Registered Linux# 179460 http://www.leonerd.org.uk/
Download signature.asc
application/pgp-signature 190b

Message body not shown because it is not plain text.