AnyEvent-Filesys-Notify

 view release on metacpan or  search on metacpan

Build.PL  view on Meta::CPAN

    requires => {
        'perl'                         => '5.006',
        'Moo'                          => '1.003001',
        'MooX::late'                   => '0.014',
        'MooX::Types::MooseLike::Base' => '0.25',
        'AnyEvent'                     => '7.05',
        'Path::Iterator::Rule'         => '1.005',
        'Cwd'                          => '3.40',
        'Carp'                         => '1.20',
        'Try::Tiny'                    => '0.18',
        'namespace::autoclean'         => '0.24',
        ( $^O eq 'linux'  ? ( 'Linux::Inotify2' => '1.22' ) : () ),
        ( $^O eq 'darwin' ? ( 'Mac::FSEvents'   => '0.10' ) : () ),
        ( $^O =~ /bsd/    ? ( 'IO::KQueue'      => '0.34' ) : () ),
    },

    build_requires => {
        'Test::More'            => 0.87,
        'Test::Exception'       => 0,
        'Test::Without::Module' => 0,
        'File::Find'            => 0,

Changes  view on Meta::CPAN

      The use of local functions (rather than methods) makes subclassing
      more difficult. This change converts all utility functions in Notify.pm
      to methods. Thanks to Dave Hayes for submitting RT#104714.
    - Any users attempting to subclass should consider upgrading.

1.18 - Wed May 20 20:27:58 EDT 2015
    - Adds version to some files which were missing it
    - No change in functionality. No need to upgrade.

1.17 - Wed May 20 08:07:04 EDT 2015
    - Switches from namespace::sweep to namespace::autoclean (RT#104554).
      autoclean no longer depends on Class::MOP (a heavy prereq).
      Thanks to Karen Etheridge (ether++) for report.
    - No change in functionality. No need to upgrade.

1.16 - Fri Feb 27 13:38:46 EST 2015
    - Rewrites the test functions to accommodate optional events
      Parsing events from Inotify2 (instead of re-scanning) results in
      extraneous modifications in some situations. Tests shouldn't fail if
      these optional events are triggered.

META.json  view on Meta::CPAN

         "requires" : {
            "AnyEvent" : "7.05",
            "Carp" : "1.20",
            "Cwd" : "3.40",
            "Mac::FSEvents" : "0.10",
            "Moo" : "1.003001",
            "MooX::Types::MooseLike::Base" : "0.25",
            "MooX::late" : "0.014",
            "Path::Iterator::Rule" : "1.005",
            "Try::Tiny" : "0.18",
            "namespace::autoclean" : "0.24",
            "perl" : "5.006"
         }
      }
   },
   "provides" : {
      "AnyEvent::Filesys::Notify" : {
         "file" : "lib/AnyEvent/Filesys/Notify.pm",
         "version" : "1.23"
      },
      "AnyEvent::Filesys::Notify::Event" : {

META.yml  view on Meta::CPAN

requires:
  AnyEvent: '7.05'
  Carp: '1.20'
  Cwd: '3.40'
  Mac::FSEvents: '0.10'
  Moo: '1.003001'
  MooX::Types::MooseLike::Base: '0.25'
  MooX::late: '0.014'
  Path::Iterator::Rule: '1.005'
  Try::Tiny: '0.18'
  namespace::autoclean: '0.24'
  perl: '5.006'
resources:
  bugtracker: http://github.com/mvgrimes/AnyEvent-Filesys-Notify/issues
  license: http://dev.perl.org/licenses/
  repository: http://github.com/mvgrimes/AnyEvent-Filesys-Notify
version: '1.23'
x_contributors:
  - 'Gasol Wu E<lt>gasol.wu@gmail.comE<gt> who contributed the BSD support for IO::KQueue'
  - 'Dave Hayes E<lt>dave@jetcafe.orgE<gt>'
  - 'Carsten Wolff E<lt>carsten@wolffcarsten.deE<gt>'

lib/AnyEvent/Filesys/Notify.pm  view on Meta::CPAN

package AnyEvent::Filesys::Notify;

# ABSTRACT: An AnyEvent compatible module to monitor files/directories for changes

use Moo;
use Moo::Role ();
use MooX::late;
use namespace::autoclean;
use AnyEvent;
use Path::Iterator::Rule;
use Cwd qw/abs_path/;
use AnyEvent::Filesys::Notify::Event;
use Carp;
use Try::Tiny;

our $VERSION = '1.23';
my $AEFN = 'AnyEvent::Filesys::Notify';

lib/AnyEvent/Filesys/Notify/Event.pm  view on Meta::CPAN

package AnyEvent::Filesys::Notify::Event;

# ABSTRACT: Object to report changes in the monitored filesystem

use Moo;
use MooX::late;
use namespace::autoclean;

our $VERSION = '1.23';

has path => ( is => 'ro', isa => 'Str', required => 1 );
has type => ( is => 'ro', isa => 'Str', required => 1 );
has is_dir => ( is => 'ro', isa => 'Bool', default => 0 );

sub is_created {
    return shift->type eq 'created';
}

lib/AnyEvent/Filesys/Notify/Role/FSEvents.pm  view on Meta::CPAN

package AnyEvent::Filesys::Notify::Role::FSEvents;

# ABSTRACT: Use Mac::FSEvents to watch for changed files

use Moo::Role;
use MooX::late;
use namespace::autoclean;
use AnyEvent;
use Mac::FSEvents;
use Carp;

our $VERSION = '1.23';

sub _init {
    my $self = shift;

    # Created a new Mac::FSEvents fs_monitor for each dir to watch

lib/AnyEvent/Filesys/Notify/Role/Fallback.pm  view on Meta::CPAN

package AnyEvent::Filesys::Notify::Role::Fallback;

# ABSTRACT: Fallback method of file watching (check in regular intervals)

use Moo::Role;
use MooX::late;
use namespace::autoclean;
use AnyEvent;
use Carp;

our $VERSION = '1.23';

sub _init {
    my $self = shift;

    $self->_watcher(
        AnyEvent->timer(

lib/AnyEvent/Filesys/Notify/Role/Inotify2.pm  view on Meta::CPAN

package AnyEvent::Filesys::Notify::Role::Inotify2;

# ABSTRACT: Use Linux::Inotify2 to watch for changed files

use Moo::Role;
use MooX::late;
use namespace::autoclean;
use AnyEvent;
use Linux::Inotify2;
use Carp;
use Path::Iterator::Rule;

our $VERSION = '1.23';

# use Scalar::Util qw(weaken);  # Attempt to address RT#57104, but alas...

sub _init {

lib/AnyEvent/Filesys/Notify/Role/KQueue.pm  view on Meta::CPAN

package AnyEvent::Filesys::Notify::Role::KQueue;

# ABSTRACT: Use IO::KQueue to watch for changed files

use Moo::Role;
use MooX::late;
use namespace::autoclean;
use AnyEvent;
use IO::KQueue;
use Carp;

our $VERSION = '1.23';

# Arbitrary limit on open filehandles before issuing a warning
our $WARN_FILEHANDLE_LIMIT = 50;

sub _init {

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 0.974 second using v1.00-cache-2.02-grep-82fe00e-cpan-c98054f2a92 )