Re: Can't locate object method "loop_ignore_signal" via package "POE::Kernel" at /usr/lib/perl5/site_perl/5.8.8/POE/Resource/Signals.pm line 138.

Tony Cook <[email protected]>
Newsgroups gmane.comp.lang.perl.poe
Message-ID <[email protected]>
On Sun, Jul 06, 2008 at 10:05:05PM -0700, mike johnson wrote:
> 
> 
> 
> When trying to use POE::Loop::Event or POE::Loop::IO_Poll I get the error:
> 
> Can't locate object method "loop_ignore_signal" via package "POE::Kernel" at /usr/lib/perl5/site_perl/5.8.8/POE/Resource/Signals.pm line 138.
> BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.8.8/POE/Loop/PerlSignals.pm line 19.
> Compilation failed in require at /usr/lib/perl5/site_perl/5.8.8/POE/Loop/IO_Poll.pm line 14.
> BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.8.8/POE/Loop/IO_Poll.pm line 14.
> 
> 
> I don't get this error when not specifing a specific loop mechanism to use. Am I doing something wrong?
> 
> Running on Linux Redhat machine.  POE version is 1.0002 installed via cpan.
> 
> Thanks for any help anyone can provide in advance.

Loops depend on the POE kernel loading them, you typically can't load
them independently of POE::Kernel.

You can get POE::Kernel to load a specific loop either by loading the
module they depend on:

  use Event;
  use POE; # loads POE::Kernel, which loads POE::Loop::Event

or by supplying a loop option to POE::Kernel:

  use POE::Kernel { loop => 'Event' };

  # 1.001 or later
  use POE::Kernel { loop => 'POE::XS::Loop::Poll' };

See "Using POE with Other Event Loops" in perldoc POE::Kernel.

Though that says they can be loaded independently, which typically
doesn't work, since they rely upon trace constants created by
POE::Kernel.

Tony
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.