dlal66 has asked for the wisdom of the Perl Monks concerning the following question:
The lines in the script relevant to this are:Unable to create sub named "" at /usr/lib/perl5/site_perl/5.8.8/i386-l +inux-thread-multi/AnyEvent.pm line 1488.
The sub processTrap is defined.If I comment themy $inotify = new Linux::Inotify2 or die "unable to create new inotify + object: $!"; # add watchers --watch the snmptrapd.log file $watchObject = $inotify->watch ("/var/log/snmptrapd.log", IN_MODIFY, \ +&processTrap); $inotify_w = AnyEvent->io ( fh => $inotify->fileno, poll => 'r', cb => sub { $inotify->poll ; }, ); MainLoop;
line, the code does not give an error and quit. But obviously I need that line. Any wisdom is appreciated...$inotify_w= AnyEvent->io (...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Inotify2 + AnyEvent
by zentara (Cardinal) on Oct 04, 2011 at 17:20 UTC | |
by tye (Sage) on Oct 04, 2011 at 17:44 UTC | |
by dlal66 (Acolyte) on Oct 04, 2011 at 19:16 UTC | |
|
Re: Inotify2 + AnyEvent
by rcaputo (Chaplain) on Oct 04, 2011 at 16:19 UTC | |
|
Re: Inotify2 + AnyEvent
by zentara (Cardinal) on Oct 05, 2011 at 09:44 UTC | |
by tye (Sage) on Oct 05, 2011 at 16:08 UTC | |
by zentara (Cardinal) on Oct 05, 2011 at 20:31 UTC | |
by tye (Sage) on Oct 05, 2011 at 21:05 UTC | |
by zentara (Cardinal) on Oct 06, 2011 at 10:06 UTC | |
|