|Perl Monk, Perl Meditation|
POE::Wheel::Run & Tk Problems - Solvedby cmv (Chaplain)
|on Aug 04, 2009 at 20:59 UTC||Need Help??|
cmv has asked for the
wisdom of the Perl Monks concerning the following question:
This turns out to be a problem in POE 1.006, that is fixed in POE 1.007. I've just updated to 1.007, and now I'm seeing the "dir" output in the console window. Running under 1.006 I didn't see that. Thanks to all for the help!
I wish to use POE::Wheel::Run along with Tk to do some things.
As a starting point, I always like to grab the example code from the CPAN docs and start hacking on that.
The unmodified CPAN code runs fine as is on my various unix platforms. To get it to run under Activestate perl, I simply changed the Program line to be:
Program => 'dir',
and it also works fine.
The next step was to try to install the use Tk; at the beginning, so that POE could try to configure itself for the Tk event loop. Simply adding use Tk; before use POE; caused the program to fail on Activestate Perl (again it works fine on unix platforms).
Having a small bit of experience with these problems, I also tried use POE qw (Loop::TkActiveState); with no luck either. In addition, I did notice a POE::Wheel::Run::Win32, which I installed from Activestate and tried, but it failed even worse.
The script fails, by briefly flashing a blank Tk window, then exiting. The only output I see is the line "Child pid -2564 started as wheel 1."
Any help or pointers is appreciated!
PS - I'm attaching the code that I'm using in the following readmore tags, for completeness.