ff has asked for the wisdom of the Perl Monks concerning the following question:
$mw->iconify(); $found_problem = system $path_of_wp, $abs_pgm_log_file; $mw->deiconify();
In the Release Notes section of the 5.8.8 documentation there is a section called 'New warnings and deprecations'. Among other things it says that:
The exec LIST and system LIST operations now produce warnings on tainted data and in some future release they will produce fatal errors.
I'm not running the program in Taint mode and so I wouldn't expect this is relevant. But maybe it is.
Elsewhere in the docs, I find the following, though this should have been absorbed/okay on my previous platform of 5.8.4.
Build 808 Saturday, Dec 6, 2003
Build 808 is based on Perl 5.8.2.
<snip>
Build 805 Thursday, Feb 6, 2003
Bug Fixes and ChangesOn Windows, system() and backticks could return invalid status when running under environments where the process has to handle Windows messages. PerlScript and Perl for ISAPI fall under this category. The problem has been corrected.
The following seems to illustrate the problem on my (now) 5.8.8 system; running it produces a widget with an 'Ok' button; press it, you edit a README file, but the controlling Tk app in the background does not experience a destroy. Switch to the dummy line instead of the system line and it seems to destroy just fine. Hmm.
Thanks.
use Tk; use strict; my $poss_answer = 'Ok'; my $answer = 'Ok'; my $mw = MainWindow->new; $mw->Radiobutton( -text => $poss_answer, -value => $poss_answer, -variable => \$answer, -padx => 10, -command => sub { warn "TkAns82: '$answer'\n"; my ( $path_of_wp, $abs_pgm_log_file ) = ( 'C:\vim\vim61\gvim.exe', 'C:\vim\vim61\README.txt', ); $mw->iconify(); my $found_problem = system $path_of_wp, $abs_pgm_log_file; #= 'dummy'; $mw->deiconify(); $mw->destroy(); }, )->pack( -side => 'bottom', ); $mw->withdraw; #avoid the jumping window bug $mw->Popup; MainLoop();
|
---|