I get the same behavior. I suspect that it's due to POE::Component::DirWatch's poll routine not opening the directory on every poll, but opening it once and then rewinding it after that. New files never get processed, just the first list of files that were returned on the first poll. I don't know whether to consider this a bug in the POE::Component::DirWatch or Win32's implementation of rewinddir
. You could patch the poll routine to open the directory on every poll.
Update: Better yet, it would probably be best to modify the module to use Win32::ChangeNotify on Windows.
Update: Win32::ChangeNotify followup here