Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: ActivePerl - perl.exe works, wperl.exe does not...

by chessgui (Scribe)
on Jan 25, 2012 at 03:04 UTC ( #949809=note: print w/ replies, xml ) Need Help??


in reply to ActivePerl - perl.exe works, wperl.exe does not...

I've had a similar problem with wperl (I think it has nothing to do with ActiveState - it fails on Strawberry as well). In my particular case it was an Open2 call that hanged wperl.

The workaround was to create a script which does nothing else but launches perl.exe without a window through create process with creation flag 'CREATE_NO_WINDOW'. You run this script via wperl.exe instead of your original prog.

Mine is a Win32 solution: I don't know whether any similar thing works on Unix/Linux or not.

The launching script:

se Win32::Process; Win32::Process::Create($perl,'c:\strawberry\perl\bin\perl.exe','perl.e +xe my_original_prog.pl',0,CREATE_NO_WINDOW,'.');


The only modification to the original program itself that you include the following lines:

use Win32 qw(SW_HIDE); Win32::SetChildShowWindow(SW_HIDE);


From here on no window is created (not even for child processes opened with Open2) and the main program is safe since it is run via perl.exe.


Comment on Re: ActivePerl - perl.exe works, wperl.exe does not...
Select or Download Code
Replies are listed 'Best First'.
Re^2: ActivePerl - perl.exe works, wperl.exe does not...
by spstansbury (Monk) on Jan 26, 2012 at 18:45 UTC

    Thanks for the resonse!

    I'll give this a try. Scott...

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://949809]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (8)
As of 2015-07-31 03:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (274 votes), past polls