Loading ...
Sorry, an error occurred while loading the content.

RE: Question about par.

Expand Messages
  • Bobby Jafari
    ... EXE for windows. ... more than just PAR.pm that it ... case please post the most ... exhibit the problem. ... problem, if there is one. ... work after
    Message 1 of 2 , Nov 28, 2005
    View Source
    • 0 Attachment
      Bobby Jafari wrote:
      >> Hello list,
      >> I have a script that runs without any problems. I tried to make an
      EXE for windows.
      >> I created the exe using:
      >> pp -o script.exe script.pl
      >> When I run script.exe I get the following error:
      >> Can't locate PAR.pm in @INC (@INC contains: .) at par.pl line 678.
      >> Any ideas?
      >The @INC contains only the current directory. I'll bet it would be
      more than just PAR.pm that it
      >could not find. I haven't a clue how that could happen but in in any
      case please post the most
      >stripped down script version that you can create that will still
      exhibit the problem.
      >I can try it on my Windows XP or Linux just to confirm that there is a
      problem, if there is one.
      >How about just a simple print statement. Does a simple print statement
      work after being made into
      >an exe?
      >What version of Perl are you running? 5.8.7 build 813
      >What version of Par are you running? 0.75
      >What operating system? WinXP and Linux but I need the exe for Windows

      I think the problem is the way par handles lib
      use warnings;
      use strict;
      if ($^O =~ /Linux/i) {
      use lib qw (/ctam/qa-tests/lib);
      } else {
      use lib qw (s:\ctam\qa-tests\lib);
      require "senetasLIB.pl";
      foreach (@ARGV) {
      print "$_\n";

      If I comment out require line, the exe works. If I leave the require
      line, it fails with the following message:
      Can't locate Net/Telnet.pm in @INC (@INC contains: /ctam/qa-tests/lib
      64c) CODE(0xd3a374) .) at /ctam/qa-tests/lib/senetasLIB.pl line 5.
      BEGIN failed--compilation aborted at /ctam/qa-tests/lib/senetasLIB.pl
      line 5.
      Compilation failed in require at script/print.pl line 18.

      Because senetasLib.pl uses Telnet module but pp doesn't seem to
      correctly import @INC. Is my analysis correct?
    Your message has been successfully submitted and would be delivered to recipients shortly.