POE::Component::DirWatch::New - POE::Component::DirWatch::New documentation


POE-Component-DirWatch documentation Contained in the POE-Component-DirWatch distribution.

Index


Code Index:

NAME

Top

POE::Component::DirWatch::New

DESCRIPTION

Top

DirWatch::New extends DirWatch to exclude previously seen files.

This module consumes the POE::Component::DirWatch::Role::Signatures role, please see its documentation for information about methods or attributes it provides or extends.

METHODS

Top

file_callback

around '_file_callback' Don't call the callback if file has been seen.

meta

Keeping tests happy.

SEE ALSO

Top

POE::Component::DirWatch, Moose

COPYRIGHT

Top


POE-Component-DirWatch documentation Contained in the POE-Component-DirWatch distribution.

package POE::Component::DirWatch::New;

use POE;
use Moose;

our $VERSION = "0.300000";

extends 'POE::Component::DirWatch';
with 'POE::Component::DirWatch::Role::Signatures';

#--------#---------#---------#---------#---------#---------#---------#---------

around _file_callback => sub {
  my $orig = shift;
  my ($self, $file) = @_[OBJECT, ARG0];
  return if exists $self->signatures->{"$file"};
  $orig->(@_);
};

__PACKAGE__->meta->make_immutable;

1;

__END__;

#--------#---------#---------#---------#---------#---------#---------#---------