steve_s741 has asked for the wisdom of the Perl Monks concerning the following question:

Hi there, I've been reading a few posts on problems others have experienced with getting this module to behave, and found a few code examples that might get me closer to solving the problem, but I can't get the examples I've found past first base! A few use this syntax to instantiate a watcher: POE::Component::DirWatch->spawn( etc ) But when I try and run any code using this syntax, I get this error: Can't locate object method "spawn" via package "POE::Component::DirWatch" Is this an obsolete syntax form? Thanks in advance, Steve
  • Comment on Problems getting POE::Component::Dirwatch to work

Replies are listed 'Best First'.
Re: Problems getting POE::Component::Dirwatch to work
by Khen1950fx (Canon) on Apr 08, 2011 at 09:08 UTC
    The current version of POE::Component::DirWatch by Justin Hunter doesn't use spawn but new instead. There was an older version by Eric Cholet that used spawn, but that was backpanned in 2008; however, if you look at the POE Components List at http://poe.perl.org/, the older version is the one that is listed. Ignore that and use the CPAN version.