Dear fellow monks,
I am trying to create a standalone perl executable for a Perl/Tk application. To this aim, I used the pp command with the -l option in order to include all required modules:
pp -vvv -l C:\Perl\lib -l C:\Perl\site\lib -o program.pl program.exe
When I try to run my exe, I get the following error:
Can't locate POSIX.pm in @INC (@INC contains: CODE(0x1f0ef80) C:\Users +\ADMINI~1\AppData\Local\Temp\par-Administrator\cache-17f4ea2f953b4df5 +d967d28be8eb4c9a4937753f\inc\lib C:\Users\ADMINI~1\AppData\Local\Temp +\par-Administrator\cache-17f4ea2f953b4df5d967d28be8eb4c9a4937753f\inc + CODE(0x17c5f40) CODE(0x17c60b4)) at script/program.pl line 37. BEGIN failed--compilation aborted at script/program.pl line 37.
Then I specifically tried adding the POSIX module to my pp command as follows:
pp -vvv -l C:\Perl\lib -l C:\Perl\site\lib -a C:\Perl\lib\POSIX.pm -o +program.pl program.exe
I see the module being added as command runs :
\site\bin/pp: ... adding C:/Perl/lib/POSIX.pm as Perl/lib/POSIX.pm
but I get the same error at runtime.

My OS is Windows Vista Home Premium, I have just updated cpan with the latest updates, I have ActivePerl-5.8.8.822-MSWin32-x86-280952 and finally got PAR::Packer 0.982 from cpan. If of any use, the starting bit of my program.pl with the module requirements is as follows
use threads; use threads::shared; #setup thread code before any Tk code my $thread_data1 : shared; $thread_data1; my $thread_die1 : shared; $thread_die1 = 0; my $thread_go1 : shared; $thread_go1 = 0; my $thread1 = threads->new(\&work); my $thread_data2 : shared; $thread_data2; my $thread_die2 : shared; $thread_die2 = 0; my $thread_go2 : shared; $thread_go2 = 0; my $thread_user2 : shared; $thread_user2; my $thread_pass2 : shared; $thread_pass2; my $thread2 = threads->new(\&setconn); use Time::HiRes; use Tk; use Tk::Icon; use Tk::TopLevel; #use Tk::ProgressBar; use utf8; use Win32; use Win32::TieRegistry; use Win32::OLE('in'); use Win32::OLE qw(EVENTS); use Net::UPnP::ControlPoint; use Net::Telnet; use POSIX":sys_wait_h";
I would highly appreciate any help as I 've been looking at this since yesterday and am at a total loss!

Regards,
Athanasia

In reply to Problem with POSIX.pm module using pp by athanasia

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.