r48369 - in /branches/upstream/libfile-changenotify-perl/current: ./ lib/File/ lib/File/ChangeNotify/ lib/File/ChangeNotify/Watcher/ t/

jawnsy-guest at users.alioth.debian.org jawnsy-guest at users.alioth.debian.org
Sun Dec 6 22:08:01 UTC 2009


Author: jawnsy-guest
Date: Sun Dec  6 22:06:38 2009
New Revision: 48369

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=48369
Log:
[svn-upgrade] Integrating new upstream version, libfile-changenotify-perl (0.10)

Added:
    branches/upstream/libfile-changenotify-perl/current/t/instantiate-twice.t
Modified:
    branches/upstream/libfile-changenotify-perl/current/Changes
    branches/upstream/libfile-changenotify-perl/current/MANIFEST
    branches/upstream/libfile-changenotify-perl/current/META.yml
    branches/upstream/libfile-changenotify-perl/current/Makefile.PL
    branches/upstream/libfile-changenotify-perl/current/SIGNATURE
    branches/upstream/libfile-changenotify-perl/current/lib/File/ChangeNotify.pm
    branches/upstream/libfile-changenotify-perl/current/lib/File/ChangeNotify/Event.pm
    branches/upstream/libfile-changenotify-perl/current/lib/File/ChangeNotify/Watcher.pm
    branches/upstream/libfile-changenotify-perl/current/lib/File/ChangeNotify/Watcher/Default.pm
    branches/upstream/libfile-changenotify-perl/current/lib/File/ChangeNotify/Watcher/Inotify.pm
    branches/upstream/libfile-changenotify-perl/current/lib/File/ChangeNotify/Watcher/KQueue.pm

Modified: branches/upstream/libfile-changenotify-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfile-changenotify-perl/current/Changes?rev=48369&op=diff
==============================================================================
--- branches/upstream/libfile-changenotify-perl/current/Changes (original)
+++ branches/upstream/libfile-changenotify-perl/current/Changes Sun Dec  6 22:06:38 2009
@@ -1,3 +1,11 @@
+0.10   2009-12-06
+
+- Attempting to instantiate more than one watcher failed if you were on a
+  system where one of the watcher subclasses could not be loaded (which is
+  basically every system because no system has both inotify and kqueue). Patch
+  by Mark Grimes. RT #52477.
+
+
 0.09   2009-11-09
 
 - This release fixes the excluded-dirs.t under Windows. There are no other

Modified: branches/upstream/libfile-changenotify-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfile-changenotify-perl/current/MANIFEST?rev=48369&op=diff
==============================================================================
--- branches/upstream/libfile-changenotify-perl/current/MANIFEST (original)
+++ branches/upstream/libfile-changenotify-perl/current/MANIFEST Sun Dec  6 22:06:38 2009
@@ -12,6 +12,7 @@
 README
 t/all.t
 t/excluded-dirs.t
+t/instantiate-twice.t
 t/lib/File/ChangeNotify/TestHelper.pm
 xt/kwalitee.t
 xt/pod-coverage.t

Modified: branches/upstream/libfile-changenotify-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfile-changenotify-perl/current/META.yml?rev=48369&op=diff
==============================================================================
--- branches/upstream/libfile-changenotify-perl/current/META.yml (original)
+++ branches/upstream/libfile-changenotify-perl/current/META.yml Sun Dec  6 22:06:38 2009
@@ -1,16 +1,38 @@
 ---
-name: File-ChangeNotify
-version: 0.09
+abstract: 'Watch for changes to files, cross-platform style'
 author:
   - 'Dave Rolsky, E<lt>autarch at urth.orgE<gt>'
-abstract: 'Watch for changes to files, cross-platform style'
-license: perl
-resources:
-  license: http://dev.perl.org/licenses/
 build_requires:
   File::Path: 0
   File::Temp: 0
   Test::More: 0
+configure_requires:
+  Module::Build: 0.35
+generated_by: 'Module::Build version 0.351'
+license: perl
+meta-spec:
+  url: http://module-build.sourceforge.net/META-spec-v1.4.html
+  version: 1.4
+name: File-ChangeNotify
+provides:
+  File::ChangeNotify:
+    file: lib/File/ChangeNotify.pm
+    version: 0.10
+  File::ChangeNotify::Event:
+    file: lib/File/ChangeNotify/Event.pm
+    version: 0.10
+  File::ChangeNotify::Watcher:
+    file: lib/File/ChangeNotify/Watcher.pm
+    version: 0.10
+  File::ChangeNotify::Watcher::Default:
+    file: lib/File/ChangeNotify/Watcher/Default.pm
+    version: 0.10
+  File::ChangeNotify::Watcher::Inotify:
+    file: lib/File/ChangeNotify/Watcher/Inotify.pm
+    version: 0.10
+  File::ChangeNotify::Watcher::KQueue:
+    file: lib/File/ChangeNotify/Watcher/KQueue.pm
+    version: 0.10
 requires:
   Carp: 0
   Class::MOP: 0
@@ -21,28 +43,6 @@
   MooseX::Params::Validate: 0.08
   MooseX::SemiAffordanceAccessor: 0
   Time::HiRes: 0
-configure_requires:
-  Module::Build: 0.35
-provides:
-  File::ChangeNotify:
-    file: lib/File/ChangeNotify.pm
-    version: 0.09
-  File::ChangeNotify::Event:
-    file: lib/File/ChangeNotify/Event.pm
-    version: 0.09
-  File::ChangeNotify::Watcher:
-    file: lib/File/ChangeNotify/Watcher.pm
-    version: 0.09
-  File::ChangeNotify::Watcher::Default:
-    file: lib/File/ChangeNotify/Watcher/Default.pm
-    version: 0.09
-  File::ChangeNotify::Watcher::Inotify:
-    file: lib/File/ChangeNotify/Watcher/Inotify.pm
-    version: 0.09
-  File::ChangeNotify::Watcher::KQueue:
-    file: lib/File/ChangeNotify/Watcher/KQueue.pm
-    version: 0.09
-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.10

Modified: branches/upstream/libfile-changenotify-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfile-changenotify-perl/current/Makefile.PL?rev=48369&op=diff
==============================================================================
--- branches/upstream/libfile-changenotify-perl/current/Makefile.PL (original)
+++ branches/upstream/libfile-changenotify-perl/current/Makefile.PL Sun Dec  6 22:06:38 2009
@@ -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.35_10
 use ExtUtils::MakeMaker;
 WriteMakefile
 (
@@ -8,14 +8,14 @@
                            'Carp' => '0',
                            'Class::MOP' => '0',
                            'File::Find' => '0',
-                           'File::Path' => '0',
+                           'File::Path' => 0,
                            'File::Spec' => '0',
-                           'File::Temp' => '0',
+                           'File::Temp' => 0,
                            'Module::Pluggable::Object' => '0',
                            'Moose' => '0',
                            'MooseX::Params::Validate' => '0.08',
                            'MooseX::SemiAffordanceAccessor' => '0',
-                           'Test::More' => '0',
+                           'Test::More' => 0,
                            'Time::HiRes' => '0'
                          },
           'INSTALLDIRS' => 'site',

Modified: branches/upstream/libfile-changenotify-perl/current/SIGNATURE
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfile-changenotify-perl/current/SIGNATURE?rev=48369&op=diff
==============================================================================
--- branches/upstream/libfile-changenotify-perl/current/SIGNATURE (original)
+++ branches/upstream/libfile-changenotify-perl/current/SIGNATURE Sun Dec  6 22:06:38 2009
@@ -15,19 +15,20 @@
 Hash: SHA1
 
 SHA1 320e201e3ad750cc11b4a5154513bbb69d252baf Build.PL
-SHA1 b8d9023abda64c8203470239df5b1aac0ceccca1 Changes
-SHA1 e40d6e15d5589e7f9c853f7e5a7e626395a9e885 MANIFEST
-SHA1 c7c02de100e93eca156da3c4e1b33b77589bb514 META.yml
-SHA1 63c491a63b40e106c8f11e011ee984298f809e48 Makefile.PL
+SHA1 28696b5e71f795ae095ef3220e45d8ea9e8d3538 Changes
+SHA1 36ea511abb6f5e3f82bdb8c00416c328aa01c209 MANIFEST
+SHA1 18c55a843ccde6ca39cbd91f5e09d8f5a1639bad META.yml
+SHA1 814cce029c7e7a6d7e00c5186ce98c27834816fb Makefile.PL
 SHA1 87a34b42c7b238703780d6f0176cca227d48688f README
-SHA1 5ab6f676f47f8ef0ce0860297310a52a10f8e6ff lib/File/ChangeNotify.pm
-SHA1 3a32a37b48992042e9d6116c85843bc908dceda3 lib/File/ChangeNotify/Event.pm
-SHA1 f62c3ca228ceb345a8834465594cbd78fa541f5c lib/File/ChangeNotify/Watcher.pm
-SHA1 24c1d062e20d82fa11b2c84cdc6fe0097bcddd81 lib/File/ChangeNotify/Watcher/Default.pm
-SHA1 6a3696264cdd5da6f9e1f7456eb3be50cf990295 lib/File/ChangeNotify/Watcher/Inotify.pm
-SHA1 75acb53263ad71719942d7b775d424d5002229d8 lib/File/ChangeNotify/Watcher/KQueue.pm
+SHA1 0ad6f305f83c1c1e70ddbc00662cdad194f47821 lib/File/ChangeNotify.pm
+SHA1 897bf8623edd218bb1ca274ec99bdcf8b911b2ab lib/File/ChangeNotify/Event.pm
+SHA1 ebd813718361e32a510639049d9cbb54bb12c10c lib/File/ChangeNotify/Watcher.pm
+SHA1 e6cd035d81d6ede1598274ae22f72cda1465bfff lib/File/ChangeNotify/Watcher/Default.pm
+SHA1 6f292d629bfc3c07e14d9f35c303f94b0ce74e3d lib/File/ChangeNotify/Watcher/Inotify.pm
+SHA1 62e7821e7f9637761d6811cfdc950570e402c9fb lib/File/ChangeNotify/Watcher/KQueue.pm
 SHA1 a20ef45409fdaaa48eb6c23e61c549f5578f8538 t/all.t
 SHA1 5fce136606b00c4f30c536d19efeb24f35c8394e t/excluded-dirs.t
+SHA1 2874d474b1913690b64e4dc43ddf1ce59b2d08da t/instantiate-twice.t
 SHA1 7937d1a567dab6508584f4f5c5b88f4d0a03dae2 t/lib/File/ChangeNotify/TestHelper.pm
 SHA1 09190c9e56f8c73824b2fd32dc650d5530b63c68 xt/kwalitee.t
 SHA1 8e6421341f83d310a8dad8a98542c390a8570118 xt/pod-coverage.t
@@ -37,7 +38,7 @@
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.9 (GNU/Linux)
 
-iEYEARECAAYFAkr3vZQACgkQIgMCsV8qvRLM3ACeM5Tt3LAaj4HWKzGv2zctWNfP
-P2oAoIkL/Jl9IhY8Gn6JEdT58Xrib9JM
-=eFOm
+iEYEARECAAYFAkscAE4ACgkQIgMCsV8qvRIQ8wCbB303VajhDD1h1g2Fysy57XFo
+ak8AmgLq38QIKKG6tx6wO9Q1s7nykcSt
+=Fa7E
 -----END PGP SIGNATURE-----

Modified: branches/upstream/libfile-changenotify-perl/current/lib/File/ChangeNotify.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfile-changenotify-perl/current/lib/File/ChangeNotify.pm?rev=48369&op=diff
==============================================================================
--- branches/upstream/libfile-changenotify-perl/current/lib/File/ChangeNotify.pm (original)
+++ branches/upstream/libfile-changenotify-perl/current/lib/File/ChangeNotify.pm Sun Dec  6 22:06:38 2009
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-our $VERSION = '0.09';
+our $VERSION = '0.10';
 
 use Carp qw( confess );
 use Class::MOP;
@@ -12,7 +12,7 @@
 sub instantiate_watcher {
     my $class = shift;
 
-    for my $class ( $class->_all_classes() ) {
+    for my $class ( $class->usable_classes() ) {
         if ( _try_load($class) ) {
             return $class->new(@_);
         }
@@ -22,10 +22,15 @@
         "Could not load a File::ChangeNotify::Watcher subclass (this should not happen, something is badly broken)";
 }
 
-sub usable_classes {
-    my $class = shift;
+{
+    my @usable_classes = ();
 
-    return grep { _try_load($_) } $class->_all_classes();
+    sub usable_classes {
+        my $class = shift;
+
+        return @usable_classes if @usable_classes;
+        return @usable_classes = grep { _try_load($_) } $class->_all_classes();
+    }
 }
 
 sub _try_load {
@@ -34,7 +39,7 @@
     eval { Class::MOP::load_class($class) };
 
     my $e = $@;
-    die $e if $e && $e !~ /Can\'t locate/;
+    die $e if $e && $e !~ /Can\'t locate|did not return a true value/;
 
     return $e ? 0 : 1;
 }

Modified: branches/upstream/libfile-changenotify-perl/current/lib/File/ChangeNotify/Event.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfile-changenotify-perl/current/lib/File/ChangeNotify/Event.pm?rev=48369&op=diff
==============================================================================
--- branches/upstream/libfile-changenotify-perl/current/lib/File/ChangeNotify/Event.pm (original)
+++ branches/upstream/libfile-changenotify-perl/current/lib/File/ChangeNotify/Event.pm Sun Dec  6 22:06:38 2009
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-our $VERSION = '0.09';
+our $VERSION = '0.10';
 
 use Moose;
 use Moose::Util::TypeConstraints;

Modified: branches/upstream/libfile-changenotify-perl/current/lib/File/ChangeNotify/Watcher.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfile-changenotify-perl/current/lib/File/ChangeNotify/Watcher.pm?rev=48369&op=diff
==============================================================================
--- branches/upstream/libfile-changenotify-perl/current/lib/File/ChangeNotify/Watcher.pm (original)
+++ branches/upstream/libfile-changenotify-perl/current/lib/File/ChangeNotify/Watcher.pm Sun Dec  6 22:06:38 2009
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-our $VERSION = '0.09';
+our $VERSION = '0.10';
 
 use File::ChangeNotify::Event;
 use List::MoreUtils qw(all);

Modified: branches/upstream/libfile-changenotify-perl/current/lib/File/ChangeNotify/Watcher/Default.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfile-changenotify-perl/current/lib/File/ChangeNotify/Watcher/Default.pm?rev=48369&op=diff
==============================================================================
--- branches/upstream/libfile-changenotify-perl/current/lib/File/ChangeNotify/Watcher/Default.pm (original)
+++ branches/upstream/libfile-changenotify-perl/current/lib/File/ChangeNotify/Watcher/Default.pm Sun Dec  6 22:06:38 2009
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-our $VERSION = '0.09';
+our $VERSION = '0.10';
 
 use File::Find qw( finddepth );
 use File::Spec;

Modified: branches/upstream/libfile-changenotify-perl/current/lib/File/ChangeNotify/Watcher/Inotify.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfile-changenotify-perl/current/lib/File/ChangeNotify/Watcher/Inotify.pm?rev=48369&op=diff
==============================================================================
--- branches/upstream/libfile-changenotify-perl/current/lib/File/ChangeNotify/Watcher/Inotify.pm (original)
+++ branches/upstream/libfile-changenotify-perl/current/lib/File/ChangeNotify/Watcher/Inotify.pm Sun Dec  6 22:06:38 2009
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-our $VERSION = '0.09';
+our $VERSION = '0.10';
 
 use File::Find ();
 use Linux::Inotify2;

Modified: branches/upstream/libfile-changenotify-perl/current/lib/File/ChangeNotify/Watcher/KQueue.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfile-changenotify-perl/current/lib/File/ChangeNotify/Watcher/KQueue.pm?rev=48369&op=diff
==============================================================================
--- branches/upstream/libfile-changenotify-perl/current/lib/File/ChangeNotify/Watcher/KQueue.pm (original)
+++ branches/upstream/libfile-changenotify-perl/current/lib/File/ChangeNotify/Watcher/KQueue.pm Sun Dec  6 22:06:38 2009
@@ -5,7 +5,7 @@
 
 use Moose;
 
-our $VERSION = '0.09';
+our $VERSION = '0.10';
 
 use File::Find ();
 use IO::KQueue;

Added: branches/upstream/libfile-changenotify-perl/current/t/instantiate-twice.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfile-changenotify-perl/current/t/instantiate-twice.t?rev=48369&op=file
==============================================================================
--- branches/upstream/libfile-changenotify-perl/current/t/instantiate-twice.t (added)
+++ branches/upstream/libfile-changenotify-perl/current/t/instantiate-twice.t Sun Dec  6 22:06:38 2009
@@ -1,0 +1,20 @@
+use strict;
+use warnings;
+
+use Test::Without::Module qw( Linux::Inotify2 );
+use Test::More tests => 2;
+
+use File::ChangeNotify;
+
+
+my $watcher1 = File::ChangeNotify->instantiate_watcher( directories => 't' );
+my $watcher2 = File::ChangeNotify->instantiate_watcher( directories => 't' );
+
+ok(
+    $watcher1->isa('File::ChangeNotify::Watcher'),
+    'first isa File::ChangeNotify::Watcher'
+);
+ok(
+    $watcher2->isa('File::ChangeNotify::Watcher'),
+    'second isa File::ChangeNotify::Watcher'
+);




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