in reply to Re: perltk menu in pp executable
in thread perltk menu in pp executable

I've come across this many times. When I write the code I now, just as a matter of habit, put a "use" statement in every time that I start using a new type of widget. This will apply to anything that is auto loaded at run time. Testing one of the pp exe files is important as occasionally it will "blow up" when some code is encountered that needs something that is not there.

Since the Op is on Active State, I would consider buying a copy of their dev kit which will contain the PerlApp program. Active State has included some heuristics for common libraries like Tk. PerlApp scans the source code looking for extra things that need to be forced into the .exe. In the Op's case it would have automatically included Tk::Menu into the resulting .exe without him having to put a use statement in the source code.

The disadvantage is that PerlApp will set you back a couple hundred dollars. If you are doing this code for a company, that is the best way to go as this program can do all sorts of other little zoomy touches (include an icon, put in the Microsoft version info in for the file, etc). A few hundred bucks is typically not a problem compared with the time and hassle that this will save the Op.

It is also possible to add command line args that "force" modules into the final .exe, but in my opinion adding a "use" statement in the source code is a far superior solution.

Replies are listed 'Best First'.
Re^3: perltk menu in pp executable
by Ged (Initiate) on Mar 31, 2011 at 07:11 UTC
    Thanks for all your postings! I tried the whole thing on a different machine (with obviously a slightly different perl environment) and it worked. I believe it is now up to me to check where the differences are. Thanks again for your fast replies! -ged
      I guess your problem is fixed in more recent PAR