Subject: | Missing import line causes the module to not load correctly |
Hello,
When working on my POE::Devel::Benchmarker code I noticed this problem
show up. I'm loading POE loops via the POE_EVENT_LOOP env var.
apoc@blackhole:~$ POE_EVENT_LOOP="Glib" perl -MPOE -e 1
Undefined subroutine &Glib::main_depth called at
/usr/local/share/perl/5.10.0/POE/Loop/Glib.pm line 260.
BEGIN failed--compilation aborted at (eval 1) line 1.
could not import qw(Kernel) at -e line 0
BEGIN failed--compilation aborted.
apoc@blackhole:~$
The fix is a one-line patch: "use Glib;" right after line 19, the "no
warnings 'redefine';" line. Doing that will result in:
apoc@blackhole:~$ POE_EVENT_LOOP="Glib" perl -MPOE -e 1
apoc@blackhole:~$
Yay! Thanks again for your work on this loop module :)
--
~Apocalypse