Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

(tye)Re: Win32 executable AS PerlApp, perl2exe, perlcc, ??

by tye (Sage)
on Oct 23, 2001 at 20:13 UTC ( [id://120831]=note: print w/replies, xml ) Need Help??


in reply to Win32 executable AS PerlApp, perl2exe, perlcc, ??

Why play silly tricks that have been shown to break scripts. Why pay money? Add END { print join( $/, values %INC ), $/ } to your script. Copy your Perl directory. Delete most modules not mentioned by the above output from the copy. Try your script on the copy. Recopy any parts that you shouldn't have deleted. Put your script into the "bin" subdirectory. Put "bin/perl bin/script" into "run.bat" in the main directory. Zip it up.

All you friend will need to do is unzip the results into any directory they like and "run".

The other methods you mention do basically the same things except they try to be tricky about how they extract the files so that it doesn't look like that is what is going on. The "being tricky" part can break scripts in strange ways (though scripts often will continue to work).

Granted, the automation of determining what to keep and what to delete is kind of nice (except when it guesses wrong), but it isn't worth the price and the potential breakage to me.

By not "installing" Perl, about all that is different is that "perl.exe" is not in the $ENV{PATH} and *.pl files are not flagged as being Perl scripts. I'm not sure what policy allows your friend to copy files but not "install" Perl, but this copying won't allow Perl to be used by malware unless the malware does something whacky like search the entire hard disk hoping to find Perl (which isn't going to happen), so that probably means it shouldn't be a problem for such a policy.

You can even skip the "delete" step. It isn't that likely to save your friend all that much space anyway. Also, start with IndigoPerl from IndigoStar. It comes as a simple *.zip file so you'll get a script that can be used to "install" Perl after everything has been unzipped. That way your friend has the option to later decide to "install" Perl w/o downloading anything extra.

        - tye (but my friends call me "Tye")

Replies are listed 'Best First'.
Re: (tye) Win32 executable AS PerlApp, perl2exe, perlcc, ??
by Brutha (Friar) on Nov 13, 2002 at 13:35 UTC
    Great post, this is may opinion, too. But ...

    I'm not sure what policy allows your friend to copy files but not "install" Perl

    Well, our real life is the following:
    We design/support a rather big application for a PC/Mainframe environment and after the switch from OS/2 to Windoze we introduced perl to configure test environment for the different development stages, databases, reproduction of bugs in production environment for different customers etc. Parts are running on a Citrix server and that has to be a closed box. It is easy to mess up things by accident, especially if the administrating people still have some homework left to do.

    As the developers do not need perl (poor guys) it was decided to keep the perl runtime off the server and the developers to minimize the risk.

      Hi,

      I came across this while looking for something to make executables from Perl scripts. I found the commercial PerlApp and Perl2EXE - but finally found PAR, which does pretty much the same thing. It's a standard Perl module - so FREE! I installed it from http://www.bribes.org/perl/ppmdir.html (search on PAR.ppd) and it appears to work fine.

      I hope this info will help other people on the hunt!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://120831]
help
Chatterbox?
and the web crawler heard nothing...

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

    No recent polls found