1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/usr/bin/perl -w
use strict;
use warnings;
use Tk;
use Tk::ToolBar;
my $mw = Tk::MainWindow->new();
my $tb = $mw->ToolBar(-movable => 1, -side => 'top', -indicatorcolor => 'blue');
$tb->ToolButton (-text => 'Button',
-tip => 'tool tip',
-command => sub { print "hi\n" });
$tb->ToolLabel (-text => 'A Label');
$tb->Label (-text => 'Another Label');
$tb->ToolLabEntry(-label => 'A LabEntry',
-labelPack => [-side => "left",
-anchor => "w"]);
my $tb2 = $mw->ToolBar();
$tb2->ToolButton(-image => 'navback22',
-tip => 'back',
-command => \&back);
$tb2->ToolButton(-image => 'navforward22',
-tip => 'forward',
-command => \&forward);
$tb2->separator;
$tb2->ToolButton(-image => 'navhome22',
-tip => 'home',
-command => \&home);
$tb2->ToolButton(-image => 'actreload22',
-tip => 'reload',
-command => \&reload);
$mw->MainLoop();
Quote4. "Can't locate somemodule.pm in @INC at myscript.pl line 1" error message
If you get an error message like the one above, you can force the missing module to be compiled into the exe by adding a line like one of the following to your script:
#perl2exe_include "somemodule.pm";
Or if the message is "Can't locate Foo/Bar.pm in ...":
#perl2exe_include "Foo/Bar.pm";