Created
February 14, 2015 02:24
-
-
Save Maffsie/f00b19df557981c78b74 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
POE::Session->create( inline_states => { _start => sub { | |
foreach my $monitor (keys $Conf->{monitor}) { | |
$_[HEAP]->{$monitor} = POE::Component::DirWatch->new( | |
alias => $monitor, | |
directory => $Conf->{monitor}->{$monitor}->{dir}, | |
filter => sub { filter($monitor,$_);}, | |
file_callback => sub { trigger($monitor,$_);}, | |
interval => $Conf->{monitor}->{$monitor}->{poll}, | |
); | |
} | |
}}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment