in reply to Re^6: Perl/Tk code structure
in thread Perl/Tk code structure
The simplest mechanism is to just add exit after the MainLoop(). When you exit the gui, MailLoop() returns and the program terminates with cleanup:
sub gui { require Tk; my $mw = Tk::MainWindow->new; ... Tk::MainLoop(); exit( 0 ); ### Add this }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^8: Perl/Tk code structure
by elef (Friar) on Apr 08, 2012 at 09:47 UTC |