samuelalfred has asked for the wisdom of the Perl Monks concerning the following question:

Hello,

I want to create standalone executables from my Perl scripts and have therefore donwloaded PAR v. 0.982 to my Win XP machine. After installing it I try pp and get the following error msg:

"Can't find par loader at C:/Perl/site/lib/PAR/Packer.pm line 101."

What to do about this? Also, I can mention that when executing makefile.pl during installation the following message was displayed:

"No compiler found, won't generate 'script/parl.exe'!"

Does anyone have an idea what to do? Thanks!

Replies are listed 'Best First'.
Re: Installing PAR
by Anonymous Monk on Feb 26, 2009 at 17:01 UTC
Re: Installing PAR
by syphilis (Archbishop) on Feb 26, 2009 at 21:49 UTC
    "No compiler found, won't generate 'script/parl.exe'!"

    You'll need a compiler to properly build PAR. If you're using ActivePerl you can get one by running ppm install MinGW
    That will give you the MinGW port of the gcc compiler (and dmake as well).

    Cheers,
    Rob
      The thing is that ppm isn't working properly on my computer. Or, at least it can't connect to the internet due to some proxy setting or firewall or whatever. I'm at work, that's why. Any other way to install MinGW?

      Thanks, Samuel
        it can't connect to the internet due to some proxy setting or firewall or whatever

        From 'ppm help':
        "http_proxy" PPM uses LWP to access remote repositories. If you need HTTP traffic p +ass via a proxy server to reach the repository, you must set the "htt +p_proxy" environment variable. Some examples: Using bash: export http_proxy=http://proxy.mycompany.com Using cmd.exe: set http_proxy=http://username:password@proxy.mycompany.com:8008 See "env_proxy" in LWP::UserAgent for more.
        MinGW and dmake come with Strawberry Perl, so you can also get it that way. Or you could try your luck with the automated (MinGW 5.1.4) installer at https://sourceforge.net/project/showfiles.php?group_id=2435 (then you'll still need to grab dmake from CPAN).

        The easiest way, imo, is to install MinGW with ppm (and that also gives you dmake). So I would first be trying to set the http_proxy environment variable as mentioned above.

        Cheers,
        Rob
Re: Installing PAR
by GrandFather (Saint) on Feb 26, 2009 at 22:25 UTC

    I've recently started using Cava Packager which seems to work quite well.


    True laziness is hard work
      Thanks for the tip. I tried it and it does work quite well. However, I have one problem with it. In my code I find out the current path by using the following command:

      (my $path = $0) =~ s/\\^\\+$//;

      This works fine in the ordinary script but when Cava has made an executable of it the path is equal to "-e". Anyone who knows a way to get the path that is consistent also after Cava has done its work?

      Thanks!

        Given that you are running the script under Windows you can:

        use Win32; my $path = Win32::GetCwd();

        which gives the current directory when the script is executed. That may not be the same as the directory containing the script of course.


        True laziness is hard work