in reply to Re^3: Problem in @INC using PAR::Packer on Windows
in thread Problem in @INC using PAR::Packer on Windows

Hi.

My version of PAR is: 0.944 and my version of ActivePerl is 5.10.

Below follows the error I got:

=== PP convertion ===
D:\documents and settings\r330293\Desktop\ns2html-0.4.6-win32\bin>pp -o ns2html.exe ns2html.pl
===

=== script execution ===

D:\documents and settings\r330293\Desktop\ns2html-0.4.6-win32\bin>ns2html.exe
Can't locate AddrCreator.pm in @INC (@INC contains: subs CODE(0x13008ac) CODE(0x115fb64) CODE(0x115feb4)) at script/ns2html.pl line 29.
BEGIN failed--compilation aborted at script/ns2html.pl line 29.
===

  • Comment on Re^4: Problem in @INC using PAR::Packer on Windows

Replies are listed 'Best First'.
Re^5: Problem in @INC using PAR::Packer on Windows
by marto (Cardinal) on Nov 19, 2009 at 12:03 UTC

    Here you tell us you had used the -a option to add a file, but this example you've given does not show this. Take a look at the -M and -a options, and the related examples in the pp documentation.

    If you have any further problems let us know.

      Note: My code can be fount at http://ns2html.sourceforge.net

      The -M switch returns the same error as shown below:

      ===
      D:\documents and settings\r330293\Desktop\ns2html-0.4.6-win32\bin>pp -a subs -o ns2html.exe ns2html.pl
      Set up gcc environment - 3.4.5 (mingw-vista special r3)
      Set up gcc environment - 3.4.5 (mingw-vista special r3)
      Copyright (C) 2004 Free Software Foundation, Inc.
      This is free software; see the source for copying conditions. There is NO
      warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


      Set up gcc environment - 3.4.5 (mingw-vista special r3)
      Copyright (C) 2004 Free Software Foundation, Inc.
      This is free software; see the source for copying conditions. There is NO
      warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.



      D:\documents and settings\r330293\Desktop\ns2html-0.4.6-win32\bin>ns2html.exe
      Can't locate AddrCreator.pm in @INC (@INC contains: subs CODE(0x1304c14) CODE(0x115fb64) CODE(0x115feb4)) at script/ns2html.pl line 29.
      BEGIN failed--compilation aborted at script/ns2html.pl line 29.

      ===

        Aside from the code review advice, using Strawberry Perl 5.10 I was able to download your code and create a working exe with a simple pp -o pp_test.exe ns2html.pl. pp_test.exe works properly.

        First 3 lines leads me to believe you could use a code review
        #!perl push @INC,"/usr/lib/perl5"; #use strict;
        Eeew, you're doing it wrong :D I reccomend
        #!perl use lib '/usr/lib/perl5'; use App::ns2html; App::ns2html->run();
        A re-usability principle your exit button should close MainWindow, not call perl's exit function.

        update: What is this?

        system("> ../tmp/rules.tmp"); system("> ../tmp/routes.tmp"); system("> ../tmp/routes.tmp");
        Please see perlport