perlquestion
dbarstis
<p>Kind monks of the monastery, I have what should be a simple issue to resolve but am having trouble finding a solution. I have a simple script using Tk with a menubar. The script runs fine when invoked with the perl command but the menubar is no where to be seen when an executable is built with pp. This is on a Windows machine with Strawberry Perl 5.14.2 and Tk 804.033 (actually the DWIM install). Any and all wisdom would be greatly appreciated.</p>
<code>
use Tk;
my $mw = MainWindow->new;
my $menubar = $mw->Menu();
$mw->configure( -menu => $menubar );
my $file = $menubar->cascade( -label => '~File' );
$file->command(
-label => '~Quit',
-command => sub { exit },
-accelerator => 'Ctrl-Q'
);
$mw->bind( '<Control-q>', sub { exit } );
$mw->MainLoop();
exit;
</code>