r54616 - in /branches/upstream/liblinux-inotify2-perl/current: Changes Inotify2.pm Inotify2.xs MANIFEST META.yml README inotify-masks.h inotify-syscalls.h inotify.h

franck at users.alioth.debian.org franck at users.alioth.debian.org
Sun Mar 21 15:16:45 UTC 2010


Author: franck
Date: Sun Mar 21 15:16:38 2010
New Revision: 54616

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=54616
Log:
[svn-upgrade] Integrating new upstream version, liblinux-inotify2-perl (1.2)

Removed:
    branches/upstream/liblinux-inotify2-perl/current/inotify-masks.h
    branches/upstream/liblinux-inotify2-perl/current/inotify-syscalls.h
    branches/upstream/liblinux-inotify2-perl/current/inotify.h
Modified:
    branches/upstream/liblinux-inotify2-perl/current/Changes
    branches/upstream/liblinux-inotify2-perl/current/Inotify2.pm
    branches/upstream/liblinux-inotify2-perl/current/Inotify2.xs
    branches/upstream/liblinux-inotify2-perl/current/MANIFEST
    branches/upstream/liblinux-inotify2-perl/current/META.yml
    branches/upstream/liblinux-inotify2-perl/current/README

Modified: branches/upstream/liblinux-inotify2-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblinux-inotify2-perl/current/Changes?rev=54616&op=diff
==============================================================================
--- branches/upstream/liblinux-inotify2-perl/current/Changes (original)
+++ branches/upstream/liblinux-inotify2-perl/current/Changes Sun Mar 21 15:16:38 2010
@@ -2,6 +2,13 @@
 
 TODO: document move/renaming issues for fullname
 TODO: find_watchers($path), or maybe just ->watchers
+
+1.2  Tue Oct  7 19:23:57 CEST 2008
+	- include IN_DELETE_SELF in events that cancel watchers, as
+          the kernel seems to handle it this way only.
+        - require sys/inotify.h to be installed, remove the local
+          copy (patch by Adrian Bunk).
+        - update examples.
 
 1.1  Fri Sep 29 16:40:14 CEST 2006
 	- fixed formatting.

Modified: branches/upstream/liblinux-inotify2-perl/current/Inotify2.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblinux-inotify2-perl/current/Inotify2.pm?rev=54616&op=diff
==============================================================================
--- branches/upstream/liblinux-inotify2-perl/current/Inotify2.pm (original)
+++ branches/upstream/liblinux-inotify2-perl/current/Inotify2.pm Sun Mar 21 15:16:38 2010
@@ -4,21 +4,14 @@
 
 =head1 SYNOPSIS
 
-=head2 Callback interface
+=head2 Callback Interface
 
  use Linux::Inotify2;
 
  # create a new object
  my $inotify = new Linux::Inotify2
-    or die "Unable to create new inotify object: $!";
+    or die "unable to create new inotify object: $!";
  
- # for Event:
- Event->io (fd =>$inotify->fileno, poll => 'r', cb => sub { $inotify->poll });
- # for Glib:
- add_watch Glib::IO $inotify->fileno, in => sub { $inotify->poll };
- # manually:
- 1 while $inotify->poll;
-
  # add watchers
  $inotify->watch ("/etc/passwd", IN_ACCESS, sub {
     my $e = shift;
@@ -32,6 +25,14 @@
     $e->w->cancel;
  });
 
+ # integration into AnyEvent (works with POE, Glib, Tk...)
+ my $inotify_w = AnyEvent->io 
+    fh => $inofity, poll => 'r', cb => sub { $inotify->poll }
+ );
+
+ # manual event loop
+ 1 while $inotify->poll;
+
 =head2 Streaming Interface
 
  use Linux::Inotify2 ;
@@ -81,7 +82,7 @@
 use base 'Exporter';
 
 BEGIN {
-   $VERSION = '1.1';
+   $VERSION = '1.2';
 
    @constants = qw(
       IN_ACCESS IN_MODIFY IN_ATTRIB IN_CLOSE_WRITE
@@ -273,7 +274,7 @@
       push @res, $_;
 
       $w->{cb}->($_) if $w->{cb};
-      $w->cancel if $_->{mask} & (IN_IGNORED | IN_UNMOUNT | IN_ONESHOT);
+      $w->cancel if $_->{mask} & (IN_IGNORED | IN_UNMOUNT | IN_ONESHOT | IN_DELETE_SELF);
    }
 
    delete $self->{ignore};
@@ -428,7 +429,7 @@
 
 =head1 SEE ALSO
 
-L<Linux::Inotify>.
+L<AnyEvent>, L<Linux::Inotify>.
 
 =head1 AUTHOR
 

Modified: branches/upstream/liblinux-inotify2-perl/current/Inotify2.xs
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblinux-inotify2-perl/current/Inotify2.xs?rev=54616&op=diff
==============================================================================
--- branches/upstream/liblinux-inotify2-perl/current/Inotify2.xs (original)
+++ branches/upstream/liblinux-inotify2-perl/current/Inotify2.xs Sun Mar 21 15:16:38 2010
@@ -7,8 +7,7 @@
 #include <unistd.h>
 #include <fcntl.h>
 
-#include "inotify.h"
-#include "inotify-syscalls.h"
+#include <sys/inotify.h>
 
 MODULE = Linux::Inotify2                PACKAGE = Linux::Inotify2
 

Modified: branches/upstream/liblinux-inotify2-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblinux-inotify2-perl/current/MANIFEST?rev=54616&op=diff
==============================================================================
--- branches/upstream/liblinux-inotify2-perl/current/MANIFEST (original)
+++ branches/upstream/liblinux-inotify2-perl/current/MANIFEST Sun Mar 21 15:16:38 2010
@@ -5,9 +5,6 @@
 Makefile.PL
 Inotify2.pm
 Inotify2.xs
-inotify.h
-inotify-masks.h
-inotify-syscalls.h
 eg/simple
 eg/event
 t/00_load.t

Modified: branches/upstream/liblinux-inotify2-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblinux-inotify2-perl/current/META.yml?rev=54616&op=diff
==============================================================================
--- branches/upstream/liblinux-inotify2-perl/current/META.yml (original)
+++ branches/upstream/liblinux-inotify2-perl/current/META.yml Sun Mar 21 15:16:38 2010
@@ -1,10 +1,12 @@
-# http://module-build.sourceforge.net/META-spec.html
-#XXXXXXX This is a prototype!!!  It will change in the future!!! XXXXX#
-name:         Linux-Inotify2
-version:      1.1
-version_from: Inotify2.pm
-installdirs:  site
-requires:
-
-distribution_type: module
-generated_by: ExtUtils::MakeMaker version 6.30
+--- #YAML:1.0
+name:                Linux-Inotify2
+version:             1.2
+abstract:            ~
+license:             ~
+author:              ~
+generated_by:        ExtUtils::MakeMaker version 6.44
+distribution_type:   module
+requires:     
+meta-spec:
+    url:     http://module-build.sourceforge.net/META-spec-v1.3.html
+    version: 1.3

Modified: branches/upstream/liblinux-inotify2-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblinux-inotify2-perl/current/README?rev=54616&op=diff
==============================================================================
--- branches/upstream/liblinux-inotify2-perl/current/README (original)
+++ branches/upstream/liblinux-inotify2-perl/current/README Sun Mar 21 15:16:38 2010
@@ -2,21 +2,14 @@
     Linux::Inotify2 - scalable directory/file change notification
 
 SYNOPSIS
-  Callback interface
+  Callback Interface
      use Linux::Inotify2;
 
      # create a new object
      my $inotify = new Linux::Inotify2
-        or die "Unable to create new inotify object: $!";
- 
-     # for Event:
-     Event->io (fd =>$inotify->fileno, poll => 'r', cb => sub { $inotify->poll });
-     # for Glib:
-     add_watch Glib::IO $inotify->fileno, in => sub { $inotify->poll };
-     # manually:
-     1 while $inotify->poll;
-
-     # add watchers
+        or die "unable to create new inotify object: $!";
+     
+ # add watchers
      $inotify->watch ("/etc/passwd", IN_ACCESS, sub {
         my $e = shift;
         my $name = $e->fullname;
@@ -24,10 +17,18 @@
         print "$name is no longer mounted\n" if $e->IN_UNMOUNT;
         print "$name is gone\n" if $e->IN_IGNORED;
         print "events for $name have been lost\n" if $e->IN_Q_OVERFLOW;
- 
-        # cancel this watcher: remove no further events
+     
+    # cancel this watcher: remove no further events
         $e->w->cancel;
      });
+
+     # integration into AnyEvent (works with POE, Glib, Tk...)
+     my $inotify_w = AnyEvent->io 
+        fh => $inofity, poll => 'r', cb => sub { $inotify->poll }
+     );
+
+     # manual event loop
+     1 while $inotify->poll;
 
   Streaming Interface
      use Linux::Inotify2 ;
@@ -230,7 +231,7 @@
         queued, will not be handled and resources will be freed.
 
 SEE ALSO
-    Linux::Inotify.
+    AnyEvent, Linux::Inotify.
 
 AUTHOR
      Marc Lehmann <schmorp at schmorp.de>




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