r65498 - in /branches/upstream/libio-async-loop-epoll-perl/current: Changes LICENSE MANIFEST META.yml Makefile.PL README examples/ examples/synopsis.pl lib/IO/Async/Loop/Epoll.pm

carnil at users.alioth.debian.org carnil at users.alioth.debian.org
Fri Dec 3 21:29:49 UTC 2010


Author: carnil
Date: Fri Dec  3 21:29:35 2010
New Revision: 65498

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=65498
Log:
[svn-upgrade] new version libio-async-loop-epoll-perl (0.08)

Added:
    branches/upstream/libio-async-loop-epoll-perl/current/examples/
    branches/upstream/libio-async-loop-epoll-perl/current/examples/synopsis.pl   (with props)
Modified:
    branches/upstream/libio-async-loop-epoll-perl/current/Changes
    branches/upstream/libio-async-loop-epoll-perl/current/LICENSE
    branches/upstream/libio-async-loop-epoll-perl/current/MANIFEST
    branches/upstream/libio-async-loop-epoll-perl/current/META.yml
    branches/upstream/libio-async-loop-epoll-perl/current/Makefile.PL
    branches/upstream/libio-async-loop-epoll-perl/current/README
    branches/upstream/libio-async-loop-epoll-perl/current/lib/IO/Async/Loop/Epoll.pm

Modified: branches/upstream/libio-async-loop-epoll-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libio-async-loop-epoll-perl/current/Changes?rev=65498&op=diff
==============================================================================
--- branches/upstream/libio-async-loop-epoll-perl/current/Changes (original)
+++ branches/upstream/libio-async-loop-epoll-perl/current/Changes Fri Dec  3 21:29:35 2010
@@ -1,4 +1,10 @@
 Revision history for IO-Async-Loop-Epoll
+
+0.08    CHANGES:
+         * Full example in SYNOPSIS section
+
+        BUGFIXES:
+         * Handle EPOLLERR as on_read_ready
 
 0.07    CHANGES:
          * Updated for IO-Async 0.24

Modified: branches/upstream/libio-async-loop-epoll-perl/current/LICENSE
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libio-async-loop-epoll-perl/current/LICENSE?rev=65498&op=diff
==============================================================================
--- branches/upstream/libio-async-loop-epoll-perl/current/LICENSE (original)
+++ branches/upstream/libio-async-loop-epoll-perl/current/LICENSE Fri Dec  3 21:29:35 2010
@@ -1,4 +1,4 @@
-This software is copyright (c) 2009 by Paul Evans <leonerd at leonerd.org.uk>.
+This software is copyright (c) 2010 by Paul Evans <leonerd at leonerd.org.uk>.
 
 This is free software; you can redistribute it and/or modify it under
 the same terms as the Perl 5 programming language system itself.
@@ -12,7 +12,7 @@
 
 --- The GNU General Public License, Version 1, February 1989 ---
 
-This software is Copyright (c) 2009 by Paul Evans <leonerd at leonerd.org.uk>.
+This software is Copyright (c) 2010 by Paul Evans <leonerd at leonerd.org.uk>.
 
 This is free software, licensed under:
 
@@ -270,7 +270,7 @@
 
 --- The Artistic License 1.0 ---
 
-This software is Copyright (c) 2009 by Paul Evans <leonerd at leonerd.org.uk>.
+This software is Copyright (c) 2010 by Paul Evans <leonerd at leonerd.org.uk>.
 
 This is free software, licensed under:
 

Modified: branches/upstream/libio-async-loop-epoll-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libio-async-loop-epoll-perl/current/MANIFEST?rev=65498&op=diff
==============================================================================
--- branches/upstream/libio-async-loop-epoll-perl/current/MANIFEST (original)
+++ branches/upstream/libio-async-loop-epoll-perl/current/MANIFEST Fri Dec  3 21:29:35 2010
@@ -1,5 +1,6 @@
 Build.PL
 Changes
+examples/synopsis.pl
 lib/IO/Async/Loop/Epoll.pm
 LICENSE
 Makefile.PL

Modified: branches/upstream/libio-async-loop-epoll-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libio-async-loop-epoll-perl/current/META.yml?rev=65498&op=diff
==============================================================================
--- branches/upstream/libio-async-loop-epoll-perl/current/META.yml (original)
+++ branches/upstream/libio-async-loop-epoll-perl/current/META.yml Fri Dec  3 21:29:35 2010
@@ -1,25 +1,25 @@
 ---
-name: IO-Async-Loop-Epoll
-version: 0.07
+abstract: 'use C<IO::Async> with C<epoll> on Linux'
 author:
   - 'Paul Evans <leonerd at leonerd.org.uk>'
-abstract: use C<IO::Async> with C<epoll> on Linux
-license: perl
-resources:
-  license: http://dev.perl.org/licenses/
 build_requires:
   IO::Async::LoopTests: 0.24
   Test::More: 0
+configure_requires:
+  Module::Build: 0.36
+generated_by: 'Module::Build version 0.3607'
+license: perl
+meta-spec:
+  url: http://module-build.sourceforge.net/META-spec-v1.4.html
+  version: 1.4
+name: IO-Async-Loop-Epoll
+provides:
+  IO::Async::Loop::Epoll:
+    file: lib/IO/Async/Loop/Epoll.pm
+    version: 0.08
 requires:
   IO::Async: 0.24
   IO::Epoll: 0.02
-configure_requires:
-  Module::Build: 0.35
-provides:
-  IO::Async::Loop::Epoll:
-    file: lib/IO/Async/Loop/Epoll.pm
-    version: 0.07
-generated_by: Module::Build version 0.35
-meta-spec:
-  url: http://module-build.sourceforge.net/META-spec-v1.4.html
-  version: 1.4
+resources:
+  license: http://dev.perl.org/licenses/
+version: 0.08

Modified: branches/upstream/libio-async-loop-epoll-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libio-async-loop-epoll-perl/current/Makefile.PL?rev=65498&op=diff
==============================================================================
--- branches/upstream/libio-async-loop-epoll-perl/current/Makefile.PL (original)
+++ branches/upstream/libio-async-loop-epoll-perl/current/Makefile.PL Fri Dec  3 21:29:35 2010
@@ -1,4 +1,4 @@
-# Note: this file was auto-generated by Module::Build::Compat version 0.35
+# Note: this file was auto-generated by Module::Build::Compat version 0.3607
 use ExtUtils::MakeMaker;
 WriteMakefile
 (

Modified: branches/upstream/libio-async-loop-epoll-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libio-async-loop-epoll-perl/current/README?rev=65498&op=diff
==============================================================================
--- branches/upstream/libio-async-loop-epoll-perl/current/README (original)
+++ branches/upstream/libio-async-loop-epoll-perl/current/README Fri Dec  3 21:29:35 2010
@@ -4,13 +4,27 @@
 SYNOPSIS
      use IO::Async::Loop::Epoll;
 
+     use IO::Async::Stream;
+     use IO::Async::Signal;
+
      my $loop = IO::Async::Loop::Epoll->new();
 
-     $loop->add( ... );
+     $loop->add( IO::Async::Stream->new(
+           read_handle => \*STDIN,
+           on_read => sub {
+              my ( $self, $buffref ) = @_;
+              while( $$buffref =~ s/^(.*)\r?\n// ) {
+                 print "You said: $1\n";
+              }
+           },
+     ) );
 
      $loop->add( IO::Async::Signal->new(
-           name => 'HUP',
-           on_receipt => sub { ... },
+           name => 'INT',
+           on_receipt => sub {
+              print "SIGINT, will now quit\n";
+              $loop->loop_stop;
+           },
      ) );
 
      $loop->loop_forever();

Added: branches/upstream/libio-async-loop-epoll-perl/current/examples/synopsis.pl
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libio-async-loop-epoll-perl/current/examples/synopsis.pl?rev=65498&op=file
==============================================================================
--- branches/upstream/libio-async-loop-epoll-perl/current/examples/synopsis.pl (added)
+++ branches/upstream/libio-async-loop-epoll-perl/current/examples/synopsis.pl Fri Dec  3 21:29:35 2010
@@ -1,0 +1,31 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use IO::Async::Loop::Epoll;
+
+use IO::Async::Stream;
+use IO::Async::Signal;
+
+my $loop = IO::Async::Loop::Epoll->new();
+
+$loop->add( IO::Async::Stream->new(
+      read_handle => \*STDIN,
+      on_read => sub {
+         my ( $self, $buffref ) = @_;
+         while( $$buffref =~ s/^(.*)\r?\n// ) {
+            print "You said: $1\n";
+         }
+      },
+) );
+
+$loop->add( IO::Async::Signal->new(
+      name => 'INT',
+      on_receipt => sub {
+         print "SIGINT, will now quit\n";
+         $loop->loop_stop;
+      },
+) );
+
+$loop->loop_forever();

Propchange: branches/upstream/libio-async-loop-epoll-perl/current/examples/synopsis.pl
------------------------------------------------------------------------------
    svn:executable = *

Modified: branches/upstream/libio-async-loop-epoll-perl/current/lib/IO/Async/Loop/Epoll.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libio-async-loop-epoll-perl/current/lib/IO/Async/Loop/Epoll.pm?rev=65498&op=diff
==============================================================================
--- branches/upstream/libio-async-loop-epoll-perl/current/lib/IO/Async/Loop/Epoll.pm (original)
+++ branches/upstream/libio-async-loop-epoll-perl/current/lib/IO/Async/Loop/Epoll.pm Fri Dec  3 21:29:35 2010
@@ -1,14 +1,14 @@
 #  You may distribute under the terms of either the GNU General Public License
 #  or the Artistic License (the same terms as Perl itself)
 #
-#  (C) Paul Evans, 2008,2009 -- leonerd at leonerd.org.uk
+#  (C) Paul Evans, 2008-2010 -- leonerd at leonerd.org.uk
 
 package IO::Async::Loop::Epoll;
 
 use strict;
 use warnings;
 
-our $VERSION = '0.07';
+our $VERSION = '0.08';
 use constant API_VERSION => '0.24';
 
 use base qw( IO::Async::Loop );
@@ -18,7 +18,7 @@
 use IO::Epoll qw(
    epoll_create epoll_ctl epoll_pwait 
    EPOLL_CTL_ADD EPOLL_CTL_MOD EPOLL_CTL_DEL
-   EPOLLIN EPOLLOUT EPOLLHUP
+   EPOLLIN EPOLLOUT EPOLLHUP EPOLLERR
 );
 
 use POSIX qw( EINTR SIG_BLOCK SIG_UNBLOCK sigprocmask );
@@ -31,13 +31,27 @@
 
  use IO::Async::Loop::Epoll;
 
+ use IO::Async::Stream;
+ use IO::Async::Signal;
+
  my $loop = IO::Async::Loop::Epoll->new();
 
- $loop->add( ... );
+ $loop->add( IO::Async::Stream->new(
+       read_handle => \*STDIN,
+       on_read => sub {
+          my ( $self, $buffref ) = @_;
+          while( $$buffref =~ s/^(.*)\r?\n// ) {
+             print "You said: $1\n";
+          }
+       },
+ ) );
 
  $loop->add( IO::Async::Signal->new(
-       name => 'HUP',
-       on_receipt => sub { ... },
+       name => 'INT',
+       on_receipt => sub {
+          print "SIGINT, will now quit\n";
+          $loop->loop_stop;
+       },
  ) );
 
  $loop->loop_forever();
@@ -141,7 +155,7 @@
 
       my $watch = $iowatches->{$fd};
 
-      if( $bits & (EPOLLIN|EPOLLHUP) ) {
+      if( $bits & (EPOLLIN|EPOLLHUP|EPOLLERR) ) {
          $watch->[1]->() if $watch->[1];
          $count++;
       }




More information about the Pkg-perl-cvs-commits mailing list