Subject: | Cannot watch folder recursively |
Date: | Fri, 23 Oct 2009 13:54:09 +0300 |
To: | bug-POE-Component-DirWatch [...] rt.cpan.org |
From: | Razvan Cosma <razvan.cosma [...] telemach.com> |
Existing sub-folders are not listed, and new created do not trigger the
callback. File changes are detected correctly. Testing on Strawberry Perl
5.10, Win XP and 2003.
Code:
my $watcher = POE::Component::DirWatch::Object::Touched->new
(
alias => 'dirwatch',
directory => $cfg->val('folders', 'temp'),
#filter => sub { -f $_[1] },
callback => \©toftp,
interval => 1,
);
sub copytoftp {
print "\n".$file." is ready to upload to ".$cfg->val('ftp login',
'server')."/".$dir."\n";
}
$poe_kernel->run;