Skip Menu |
 

This queue is for tickets about the IO-Async CPAN distribution.

Report information
The Basics
Id: 107854
Status: open
Priority: 0/
Queue: IO-Async

People
Owner: Nobody in particular
Requestors: kes-kes [...] yandex.ru
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)



Subject: Listener documenation mistake
Download (untitled) / with headers
text/plain 276b
Hi In example you show that on_stream expect two arguments: my $listener = IO::Async::Listener->new( on_stream => sub { my ( undef, $stream ) = @_; but link http://search.cpan.org/~pevans/IO-Async-0.68/lib/IO/Async/Listener.pm#on_stream_$stream describe only one
Download (untitled) / with headers
text/plain 580b
On Mon Oct 19 07:29:49 2015, kes-kes@yandex.ru wrote: Show quoted text
> Hi > In example you show that on_stream expect two arguments: > > my $listener = IO::Async::Listener->new( > on_stream => sub { > my ( undef, $stream ) = @_; > > but link http://search.cpan.org/~pevans/IO-Async- > 0.68/lib/IO/Async/Listener.pm#on_stream_$stream > describe only one
That's just ignoring the $self that always appears as the first argument to any event handler. It's similar to it being the first argument of a method call - that fact is usually glossed over in the documentation. -- Paul Evans


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.