I have an issue where exiting a Perl Tkx
script causes the Perl Command Line Interpreter to crash.
Ex:
use strict;
use warnings;
use Tkx;
my $mw = Tkx::widget->new('.');
my $button = $mw->new_ttk__button(-text => "Hello", -command => \&main);
Tkx::pack($button);
Tkx::MainLoop;
sub main {
print "TESTING\n";
exit 0;
}
This code generates the following output:
Clicking the "Hello" button invokes the main()
subroutine which prints "TESTING" and then attempts to exit and crashes the Command Line Interpreter:
This only seems to be happening with Tkx
scripts and will only crash if the program has already entered the MainLoop
before calling exit
. Does anyone know what is going on here?
Perl version information: