[thelist] Compile Perl

Keith Davis cache at dowebs.com
Wed Jun 6 03:17:08 CDT 2001


Josh Spiegel wrote:
> 
> My Question:  Can you compile perl code to binary?  If so, is it a common
> practice?
> My reason for asking is that I have been coding between CGI and Cold Fusion
> (as some of you know).  I hate coding in CGI.  It takes so long.  I guess it
> might be easier and more efficient if I could just run executables as
> opposed to scripts.

YES! There are 2 way to do it. But you still gotta write the code, it
isn't grow on it's own. What Cold Fusion gives you that nothing in the
Republic has tried to match is a RAD with tons of canned code that
automatically fills in the repetitious and mundane. You still make the
real coding decisions in CF, you're just not aware of how much of it CF
is doing. The price is you have to live in the confines of CF's vision
of "doable", which may be incredibly large to some and insignificantly
small to others. A good editor with unlimited "snippets" can greatly
reduce the time and work on cgi. But you have to build your own snippet
library.

http://www.perl.com/pub/doc/manual/html/utils/perlcc.html

Perlcc is a c compiler built-in to the interpreter. It is used for
creating c compiled exes that are usually oop modules "used" by other
scripts. I've never used it because I prefer having the compiler
built-in to the exe so I can run it on win boxes that do not have the
interpreter installed.

http://www.indigostar.com/

Their Perl2exe comes in win and *nix flavors. It compiles an exe with
the interpreter and any modules/requires/uses included. These are exe
apps that can run on servers, or if you tk them, as standalone
applications. As server exes they are as fast as mod_perl but run only
on request. They are great for large app type server scripts that have
20 or more conditional functions. Each exe has it's own interpreter
built in so file sizes are usually min 3.5mb. You can ship the exes as
30 day expiring shareware.

The standalone is created using perl/tk. I built a perl/tk email client
that can do ordinary email, plus do "https_email" through a companion
perl "email server" on an https server. The https is for secure emails
inside a closed community (a Senator's campaign staff). Can't do that
kind of thing with Cold Fusion.

keith




More information about the thelist mailing list