Compiling Perl with PAR

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Hello Perl friends,

I am trying to compile a perl programme with :

ppm install PAR
Quoted text here. Click to load it

Then you can create an executable with the line:

Quoted text here. Click to load it

to an ".exe" programme.

However when I run the executable "file.exe" there occur problem
because I use Tk.

Below you can see the original Perl programme:

#!perl/bin/perl -w
use Tk;
use Tk::Clock;

my $MW=MainWindow->new();

### --- Prevents Main Window Resizing
$MW->bind('<Configure>' => sub{
        my $xe = $MW->XEvent;
        $MW->maxsize($xe->w, $xe->h);
        $MW->minsize($xe->w, $xe->h);

$MW->title("My Analog Clock");

$clock = $MW->Clock();

 useDigital => 1,
 useAnalog  => 1,
 anaScale  => 250,
 handColor => 'Blue3',
 secsColor => 'Yellow2',
 tickColor => 'Orange',



I am hoping that someone can help me.

The clock is a test. When this works I can solve a bigger problem.

Thanks in forehand.

Re: Compiling Perl with PAR

Quoted text here. Click to load it

You might specifically need to load Tk and/or Tk::Clock using the '-M'
switch (see perldoc pp). Something like:

pp -M Tk -M Tk::Clock -o script.exe

Not sure if you specify the '-M' switch the second time as I have done.


Site Timeline