
POE::Component::DirWatch::Object::Touched

use POE::Component::DirWatch::Object::Touched;
#$watcher is a PoCo::DW:Object::Touched
my $watcher = POE::Component::DirWatch::Object::Touched->new
(
alias => 'dirwatch',
directory => '/some_dir',
filter => sub { $_[0] =~ /\.gz$/ && -f $_[1] },
callback => \&some_sub,
interval => 1,
);
$poe_kernel->run;

POE::Component::DirWatch::Object::Touched extends DirWatch::Object::NewFile in order to exclude files that have already been processed, but still pick up files that have been changed.

Read-write. Will return a hash ref in with keys will be the full path of all previously processed documents that still exist in the file system and the values are listrefs containing the size and last changed dates of the files. [ ( stat($file) )[7..10] ]
An Array::Compare object

override 'dispatch' Don't dispatch if file has been seen before and has the same values for stat($file)[7..10]
Keeping tests happy.

POE::Component::DirWatch::Object, Moose

Guillermo Roditi, <groditi@cpan.org>

If a file is created and deleted between polls it will never be seen. Also if a file is edited more than once in between polls it will never be picked up.
Please report any bugs or feature requests to bug-poe-component-dirwatch-object at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=POE-Component-DirWatch-Object. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

You can find documentation for this module with the perldoc command.
perldoc POE::Component::DirWatch::Object::Touched
You can also look for information at:
http://rt.cpan.org/NoAuth/Bugs.html?Dist=POE-Component-DirWatch-Object

People who answered way too many questions from an inquisitive idiot:

Copyright 2006 Guillermo Roditi. All Rights Reserved. This is free software; you may redistribute it and/or modify it under the same terms as Perl itself.