Re: Activestate perlapp creates exe that hangs

Craig Votava <[email protected]>
Newsgroups gmane.comp.lang.perl.poe
Message-ID <[email protected]>
Rocco-

On Apr 20, 2009, at 2:18 PM, Rocco Caputo wrote:

> Someone has had this exact problem in a recent PerlMonks thread.

That was me (cmv on perlmonks).

> The last I read on the subject, the user was forcing  
> POE::Loop::Select usage, which bypasses the Tk event loop.  They  
> were also including Tk widgets on the perlapp command line, and  
> someone suggested that use-ing them in the code was a better option.

When perlapp includes a module, my understanding is that the module is  
made available to the application, but it's not forced to be used. In  
this case, perlapp is including POE::Loop::Select, POE::Loop::Tk, and  
POE::Loop::TkActiveState, but it's up to the application to decide  
which ones to use.

I believe I'm narrowing down the problem, but it's very slow going for  
me, as I don't understand a lot of POE yet.

Given this program:
===================
use warnings;
use strict;

use Tk;
use POE;

if(! defined($poe_main_window)) { die "\$poe_main_window not defined" };
===================

When I run it as a perl script on the windows box, it works as  
expected. When I compile it with perlapp, the resulting executable  
dies, claiming poe_main_window is not defined.

Can anyone use perlapp on this program and have the resulting  
executable avoid hitting the die?

Thanks

-Craig

PS - Here is the perlapp line I use:

perlapp --add "POE::Wheel" --add "POE::Loop::Tk" --add  
"POE::Loop::Select" --add "POE::Resource::Aliases" --add  
"POE::Resource::Events" --add "POE::Resource::Extrefs" --add  
"POE::Resource::FileHandles" --add "POE::Resource::SIDs" --add  
"POE::Resource::Sessions" --add "POE::Resource::Signals" --add  
"POE::Resource::Statistics" --add "POE::Session" --add  
"POE::Driver::SysRW" --add "POE::Filter::Line" --verbose --clean -- 
force --lib lib --exe tst130.exe tst130.pl
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.