Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

how to get an exe-file from a Perl-script for Windows

by toohoo (Beadle)
on Dec 06, 2019 at 10:54 UTC ( [id://11109740]=perlquestion: print w/replies, xml ) Need Help??

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

This was originally posted as a reply to perl2exe - no more secrets

I did read the https://metacpan.org/pod/PAR but I don't get the line where is the hint how to get an exe-file from a Perl-script for Windows. Did I simply miss the phrase?

Also for perlcc I searched and found the - in my eyes - most important page https://metacpan.org/pod/perlcc. But also there I did not find it. In cpan command line I've tried:

cpan> i /perlcc/ No objects found of any type for argument /perlcc/

So I'm standing in the wilderness. Is anybody here minding to point me to the right place to make a exe-file for Windows from a Perl-script?

Thanks in advance, Thomas

Replies are listed 'Best First'.
Re: how to get an exe-file from a Perl-script for Windows
by marto (Cardinal) on Dec 06, 2019 at 12:58 UTC

    You want pp, they split this out of PAR into PAR::Packer some time ago. To install:

    cpan pp or better yet cpanm pp

    Basic usage:

    pp -x -o exename.exe scriptname.pl

    See also ppsimple.

    Update see below

      > they split this out of PAR::Packer

      Are you sure? Both links lead to the same distribution...

      map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

        Sorry, that should have been a link to PAR.

      Hello again,

      I've tried but failed:

      Failed 14/17 test programs. 15/52 subtests failed.
      gmake: *** Makefile:972: test_dynamic Error 25
      

      But thanks nonetheless. best regards

Re: how to get an exe-file from a Perl-script for Windows
by soonix (Canon) on Dec 06, 2019 at 12:27 UTC
    PAR's synopsis says
    (If you want to make an executable that contains all module, scripts and data files, please consult the pp utility instead. pp used to be part of the PAR distribution but is now shipped as part of the PAR::Packer distribution instead.)
    pp is what you need, and it works also on Windows. Install PAR::Packer, if you don't have it yet.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://11109740]
Approved by erzuuli
Front-paged by erzuuli
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2024-04-24 19:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found