Compiling Perl with PAR

Discussion in 'Perl Misc' started by anton.vandersteen@chello.nl, Aug 30, 2006.

  1. Guest

    Hello Perl friends,

    I am trying to compile a perl programme with :

    ppm install PAR
    > ppm install Module-ScanDeps


    Then you can create an executable with the line:

    > pp script.pl -o script.exe


    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();

    $clock->config(
    useDigital => 1,
    useAnalog => 1,
    anaScale => 250,
    handColor => 'Blue3',
    secsColor => 'Yellow2',
    tickColor => 'Orange',
    );

    $clock->pack();

    MainLoop();


    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.
    , Aug 30, 2006
    #1
    1. Advertising

  2. John Bokma Guest

    "" <> wrote:

    > Hello Perl friends,
    >
    > I am trying to compile a perl programme with :
    >
    > ppm install PAR
    >> ppm install Module-ScanDeps

    >
    > Then you can create an executable with the line:
    >
    >> pp script.pl -o script.exe

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


    And the problem is? I mean: do you get a warning?

    Quite some time ago I used PAR with a project. PAR is quite smart with
    finding which modules are needed, but sometimes you need to give it a hint
    with "use modulename".

    --
    John Experienced Perl programmer: http://castleamber.com/

    Perl help, tutorials, and examples: http://johnbokma.com/perl/
    John Bokma, Aug 30, 2006
    #2
    1. Advertising

  3. Sisyphus Guest

    <> wrote in message
    news:...
    > Hello Perl friends,
    >
    > I am trying to compile a perl programme with :
    >
    > ppm install PAR
    > > ppm install Module-ScanDeps

    >
    > Then you can create an executable with the line:
    >
    > > pp script.pl -o script.exe

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


    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 script.pl

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

    Cheers,
    Rob
    Sisyphus, Aug 30, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    373
  2. Jesse Schoch
    Replies:
    2
    Views:
    121
    Jesse Schoch
    Oct 2, 2003
  3. PAR, PAR::Packer

    , Dec 1, 2006, in forum: Perl Misc
    Replies:
    1
    Views:
    199
    John Bokma
    Dec 1, 2006
  4. Replies:
    0
    Views:
    214
  5. Oliver Soeder
    Replies:
    1
    Views:
    226
Loading...

Share This Page