Re: Event module

[email protected] (Jochen Stenzel)
Newsgroups perl.loop
Message-ID <[email protected]>
Hello,

> > sub handle_client {
> >         my $event = shift;
> >         $event->w->private->accept();
> > }
> >
> > I want to be able to pass $socket to handle_client().
> > I though i would use private to do this.
>
> Try using the data() attribute instead of private().

in my opinion, the socket can be accessed directly without the data
attribute because it's already accessible via fd:

sub handle_client
  {
   my $event=shift;
   $event->w->fd->accept();
  }

                             Jochen
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.