r56702 - in /branches/upstream/libsys-syscall-perl/current: CHANGES CONTRIBUTING.txt MANIFEST META.yml Makefile.PL README.pod lib/Sys/Syscall.pm t/01-epoll.t

italo-guest at users.alioth.debian.org italo-guest at users.alioth.debian.org
Fri Apr 23 17:39:33 UTC 2010


Author: italo-guest
Date: Fri Apr 23 17:36:58 2010
New Revision: 56702

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=56702
Log:
[svn-upgrade] A integrar a nova versão de origem, libsys-syscall-perl (0.23)

Added:
    branches/upstream/libsys-syscall-perl/current/CONTRIBUTING.txt
    branches/upstream/libsys-syscall-perl/current/README.pod
Modified:
    branches/upstream/libsys-syscall-perl/current/CHANGES
    branches/upstream/libsys-syscall-perl/current/MANIFEST
    branches/upstream/libsys-syscall-perl/current/META.yml
    branches/upstream/libsys-syscall-perl/current/Makefile.PL
    branches/upstream/libsys-syscall-perl/current/lib/Sys/Syscall.pm
    branches/upstream/libsys-syscall-perl/current/t/01-epoll.t

Modified: branches/upstream/libsys-syscall-perl/current/CHANGES
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsys-syscall-perl/current/CHANGES?rev=56702&op=diff
==============================================================================
--- branches/upstream/libsys-syscall-perl/current/CHANGES (original)
+++ branches/upstream/libsys-syscall-perl/current/CHANGES Fri Apr 23 17:36:58 2010
@@ -1,3 +1,6 @@
+0.23:
+  - test bug fix https://rt.cpan.org/Public/Bug/Display.html?id=54322
+
 0.22:
   - don't modify non-localized $_.  whoops.  (we don't want to mess
     with our caller's world)

Added: branches/upstream/libsys-syscall-perl/current/CONTRIBUTING.txt
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsys-syscall-perl/current/CONTRIBUTING.txt?rev=56702&op=file
==============================================================================
--- branches/upstream/libsys-syscall-perl/current/CONTRIBUTING.txt (added)
+++ branches/upstream/libsys-syscall-perl/current/CONTRIBUTING.txt Fri Apr 23 17:36:58 2010
@@ -1,0 +1,2 @@
+See:
+http://contributing.appspot.com/sys-syscall

Modified: branches/upstream/libsys-syscall-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsys-syscall-perl/current/MANIFEST?rev=56702&op=diff
==============================================================================
--- branches/upstream/libsys-syscall-perl/current/MANIFEST (original)
+++ branches/upstream/libsys-syscall-perl/current/MANIFEST Fri Apr 23 17:36:58 2010
@@ -1,6 +1,8 @@
 Makefile.PL
 CHANGES
 MANIFEST			This list of files
+CONTRIBUTING.txt
+README.pod
 lib/Sys/Syscall.pm
 META.yml
 t/00-use.t

Modified: branches/upstream/libsys-syscall-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsys-syscall-perl/current/META.yml?rev=56702&op=diff
==============================================================================
--- branches/upstream/libsys-syscall-perl/current/META.yml (original)
+++ branches/upstream/libsys-syscall-perl/current/META.yml Fri Apr 23 17:36:58 2010
@@ -1,12 +1,15 @@
-# http://module-build.sourceforge.net/META-spec.html
-#XXXXXXX This is a prototype!!!  It will change in the future!!! XXXXX#
-name:         Sys-Syscall
-version:      0.22
-version_from: lib/Sys/Syscall.pm
-installdirs:  site
-requires:
+--- #YAML:1.0
+name:                Sys-Syscall
+version:             0.23
+abstract:            Invoke system calls that are otherwise difficult to do from Perl.
+license:             ~
+author:              
+    - Brad Fitzpatrick <brad at danga.com>
+generated_by:        ExtUtils::MakeMaker version 6.42
+distribution_type:   module
+requires:     
     POSIX:                         0
     Test::More:                    0
-
-distribution_type: module
-generated_by: ExtUtils::MakeMaker version 6.17
+meta-spec:
+    url:     http://module-build.sourceforge.net/META-spec-v1.3.html
+    version: 1.3

Modified: branches/upstream/libsys-syscall-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsys-syscall-perl/current/Makefile.PL?rev=56702&op=diff
==============================================================================
--- branches/upstream/libsys-syscall-perl/current/Makefile.PL (original)
+++ branches/upstream/libsys-syscall-perl/current/Makefile.PL Fri Apr 23 17:36:58 2010
@@ -1,7 +1,7 @@
 #!/usr/bin/perl
 #
 #   Perl Makefile for Perlbal
-#   $Id: Makefile.PL 4 2005-07-30 04:56:21Z bradfitz $
+#   $Id$
 #
 #   Invoke with 'perl Makefile.PL'
 #

Added: branches/upstream/libsys-syscall-perl/current/README.pod
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsys-syscall-perl/current/README.pod?rev=56702&op=file
==============================================================================
--- branches/upstream/libsys-syscall-perl/current/README.pod (added)
+++ branches/upstream/libsys-syscall-perl/current/README.pod Fri Apr 23 17:36:58 2010
@@ -1,0 +1,87 @@
+=head1 NAME
+
+Sys::Syscall - access system calls that Perl doesn't normally provide access to
+
+=head1 SYNOPSIS
+
+  use Sys::Syscall;
+
+=head1 DESCRIPTION
+
+Use epoll, sendfile, from Perl.  Mostly Linux-only support now, but
+more syscalls/OSes planned for future.
+
+=head1 Exports
+
+Nothing by default.
+
+May export: sendfile epoll_ctl epoll_create epoll_wait EPOLLIN EPOLLOUT EPOLLERR EPOLLHUP EPOLL_CTL_ADD  EPOLL_CTL_DEL EPOLL_CTL_MOD
+
+Export tags:  :epoll and :sendfile
+
+=head1 Functions
+
+=head2 epoll support
+
+=over 4
+
+=item $ok = epoll_defined()
+
+Returns true if epoll might be available.  (caller must still test with epoll_create)
+
+=item $epfd = epoll_create([ $start_size ])
+
+Create a new epoll filedescriptor.  Returns -1 if epoll isn't available.
+
+=item $rv = epoll_ctl($epfd, $op, $fd, $events)
+
+See manpage for epoll_ctl
+
+=item $count = epoll_wait($epfd, $max_events, $timeout, $arrayref)
+
+See manpage for epoll_wait.  $arrayref is an arrayref to be modified
+with the items returned.  The values put into $arrayref are arrayrefs
+of [$fd, $state].
+
+=back
+
+=head2 sendfile support
+
+=over 4
+
+=item $ok = sendfile_defined()
+
+Returns true if sendfile should work on this operating system.
+
+=item $sent = sendfile($sock_fd, $file_fd, $max_send)
+
+Sends up to $max_send bytes from $file_fd to $sock_fd.  Returns bytes
+actually sent, or -1 on error.
+
+=back
+
+=head1 COPYRIGHT
+
+This module is Copyright (c) 2005 Six Apart, Ltd.
+
+All rights reserved.
+
+You may distribute under the terms of either the GNU General Public
+License or the Artistic License, as specified in the Perl README file.
+If you need more liberal licensing terms, please contact the
+maintainer.
+
+=head1 Contributing
+
+Want to contribute?  See:
+
+  L<http://contributing.appspot.com/sys-syscall>
+
+=head1 WARRANTY
+
+This is free software. IT COMES WITHOUT WARRANTY OF ANY KIND.
+
+=head1 AUTHORS
+
+Brad Fitzpatrick <brad at danga.com>
+

Modified: branches/upstream/libsys-syscall-perl/current/lib/Sys/Syscall.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsys-syscall-perl/current/lib/Sys/Syscall.pm?rev=56702&op=diff
==============================================================================
--- branches/upstream/libsys-syscall-perl/current/lib/Sys/Syscall.pm (original)
+++ branches/upstream/libsys-syscall-perl/current/lib/Sys/Syscall.pm Fri Apr 23 17:36:58 2010
@@ -8,7 +8,7 @@
 require Exporter;
 use vars qw(@ISA @EXPORT_OK %EXPORT_TAGS $VERSION);
 
-$VERSION     = "0.22";
+$VERSION     = "0.23";
 @ISA         = qw(Exporter);
 @EXPORT_OK   = qw(sendfile epoll_ctl epoll_create epoll_wait
                   EPOLLIN EPOLLOUT EPOLLERR EPOLLHUP EPOLLRDBAND
@@ -325,6 +325,12 @@
 If you need more liberal licensing terms, please contact the
 maintainer.
 
+=head1 Contributing
+
+Want to contribute?  See:
+
+  L<http://contributing.appspot.com/sys-syscall>
+
 =head1 WARRANTY
 
 This is free software. IT COMES WITHOUT WARRANTY OF ANY KIND.

Modified: branches/upstream/libsys-syscall-perl/current/t/01-epoll.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsys-syscall-perl/current/t/01-epoll.t?rev=56702&op=diff
==============================================================================
--- branches/upstream/libsys-syscall-perl/current/t/01-epoll.t (original)
+++ branches/upstream/libsys-syscall-perl/current/t/01-epoll.t Fri Apr 23 17:36:58 2010
@@ -46,18 +46,18 @@
 $t2 = time();
 ok($t2 > $t1 && $t2 < ($t1 + 3), "took a second");
 
-my $port = 60000;
 my $ip   = '127.0.0.1';
 my $listen = IO::Socket::INET->new(Listen    => 5,
                                    LocalAddr => $ip,
                                    ReuseAddr => 1,
-                                   LocalPort => $port,
                                    Proto     => 'tcp');
+my $listen_port = $listen->sockport;
 my $listen2 = IO::Socket::INET->new(Listen    => 5,
                                     LocalAddr => $ip,
                                     ReuseAddr => 1,
-                                    LocalPort => $port+1,
                                     Proto     => 'tcp');
+my $listen2_port = $listen2->sockport;
+diag "listening on $listen_port and $listen2_port";
 ok($listen, "made temp listening socket");
 ok(fileno($listen), "has fileno");
 
@@ -66,8 +66,8 @@
 socket $sock2, PF_INET, SOCK_STREAM, IPPROTO_TCP;
 IO::Handle::blocking($sock, 0);
 IO::Handle::blocking($sock2, 0);
-connect $sock, Socket::sockaddr_in($port, Socket::inet_aton($ip));
-connect $sock2, Socket::sockaddr_in($port+1, Socket::inet_aton($ip));
+connect $sock, Socket::sockaddr_in($listen_port, Socket::inet_aton($ip));
+connect $sock2, Socket::sockaddr_in($listen2_port, Socket::inet_aton($ip));
 select undef, undef, undef, 0.25;
 
 my $lifd1 = fileno($listen);




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