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. | [reply] [Watch: Dir/Any] |
I've found that adding a -x to the pp command (for 'execute') tends to fix this. With -x, the .pl is executed, pp monitors what modules are loaded and includes them in the exe. It's the easiest, fastest way to try and solve the problem. If some modules are still skipped, you can add them manually. | [reply] [Watch: Dir/Any] [d/l] [select] |
Thanks. I was hoping this would work. I got the same result.
| [reply] [Watch: Dir/Any] |