This is because some modules are used that do not exist on the other computer. They are not in your .exe, but when it is run, they are found on your computer.

When using Tk, find and "use" all the widgets that your code uses. use Tk::Button, etc. You only need: use Tk; when running with Tk installed on your machine, because Perl finds the Button or Menu or whatever when your code needs it. If you put an explicit "use" statement, that will be a huge hint to pp that it needs to include that module in the final .exe.

It is also possible to give pp a list of modules to force into the .exe, but I think that just putting a use statement in the code is easier than that. This is one area where the ActiveState PerlApp shines, they have special heuristics for big libraries like Tk and this extra futzing is not needed, but of course their app costs money.

Oh make sure that you test and exercise every type of widget that your Tk app needs. That the module is not there is only found during run time - so this can be an iterative process.


In reply to Re: pp created .exe only works on original computer by Marshall
in thread pp created .exe only works on original computer by perlpantherninja

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.