¿Cómo instalar pp (Empaquetador PAR)?

I have to create an exe from a Perl script. I installed


¿Cómo instalo pp?

preguntado el 08 de noviembre de 11 a las 18:11

6 Respuestas

I know this is a relatively old question, but for the sake of others, here is a solution that worked for me using pp (Par Packager):

  1. Instalar Fresa Perl for windows (I installed strawberry-perl-
    • I used because I wanted to try out perl2exe as well, while I'm at it (perl2exe at the time supported only up to 5.16.3 version of perl)
  2. Once installed, open Strawberry Perl Tools (e.g. through start menu -> All programs -> Strawberry Perl -> Tools), and invoke CPAN Client
  3. In the client console that opens, type:
    • get pp
    • install pp
  4. Once installation is complete, you can simply run:
    • c:\strawberry\perl\site\bin\pp.bat -o myScript.exe myScript.pl
    • Which will produce a myScript.exe which is a standalone executable (no externo perl interpreter is needed)

Nota: Puede utilizar el -d command line switch in order to reduce the size of the executable. This will not include perl interpreter code inside the executable, reducing the size of the executable, however you will need to provide perl5x.dll in the same directory as your executable, or include it on the PATH environment variable.

Respondido el 30 de diciembre de 14 a las 14:12

Until the issue with 1.010 is fixed, do the following:

  1. Dirígete a http://search.cpan.org/dist/PAR-Packer/

  2. From the "Other releases" drop down list, select PAR-Packer-1.009 y descargarlo

  3. Decompress the archive, preserving directory structure

  4. Corral perl Makefile.PL

  5. Install all the missing prerequisites by hand using ppm. P.ej, ppm install Module::ScanDeps etc.

  6. Install MingW: ppm install MingW

  7. dmake, entonces dmake test, entonces dmake install

Later, you can remove PAR::Packer from the site area using the ppm GUI and install the fixed version.

respondido 09 nov., 11:01

This is a Perl module called PAR :: Empaquetador, so it can be installed as any Perl module with CPAN. Unfortunately, you're using ActivePerl which isn't quite compatible with CPAN. Instead, you can see if use ActiveState's Perl Package Manager para instalar este módulo.

If the module isn't available via the Perl Package Manger, you can try installing with the CPAN command line utility. Open up a Console Window (Start->Accessories->Command Prompt) and type in cpan y pulse <ENTER>. Newer versions of ActiveState should automáticamente install the required compilers, etc. when you first start to use CPAN.

yo prefiero Fresa Perl for Windows because it's more compatible with CPAN. However, ActivePerl has a lot of the Win32 modules already installed. Plus, it comes with the Perl Package Manager which is nice.

ADVERTENCIA: ActiveState installs a lot of these Perl scripts not in C:\Perl\bin, pero en C:\Perl\Site\bin which means you have to make sure that directory is in your path too.

respondido 08 nov., 11:22

@JackManey - If the poster was asking which version of Perl to use, I would advocate Strawberry over ASP, but ASP is already installed. However, ActiveState can use CPAN for module installation, and will install MinGW if required. I haven't found a module ASP won't install although people tell me there are a few. - David W.

As of v1.010, the software cannot be automatically packaged, see the report at Trouchelle's repo.

Install CPAN using PPM, then continue as per the Preguntas frecuentes sobre Stack Overflow Perl: ¿Cuál es la forma más sencilla de instalar un módulo Perl que falta?

contestado el 23 de mayo de 17 a las 15:05

ppm install MinGW
cpanp i Win32::Exe PAR::Packer

respondido 11 nov., 11:12

In addition to the above answers, You can use cpan to install the PAR::Packer. From your windows command prompt use the command: cpan install PAR::Packer. Note: I have Strawberry perl installed. cpan installs the modules and the dependencies as well.

Respondido 27 Oct 16, 18:10

Without instruction with what one with "PAR::Packer or Strawberry Perl this isn't a very helpful answer. - Jonathan Mee

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.