SPUG: perl2exe perl-cgi file size problem

Marc M. Adkins Marc.M.Adkins at Doorways.org
Thu May 2 15:14:10 CDT 2002


The parameter code is pretty simple.  You might be well off stealing it from
CGI.pm.  I've done this myself (and might still have the code somewhere if
you want me to look for it).

Another option might be CGI::Lite, which is available on CPAN.  It is a
stripped-down version that is supposed to be smaller, load faster, etc.  I
have not personally used it.

If you feel brave, you might look into FastCGI (http://www.fastcgi.com/).
Then you would be running an .exe which would call your perl script, which
would run continuously as a stand-alone process.  So you would need to be
able to run a process with your page generator in it.  An extra benefit is
faster performance, as you aren't starting your script from scratch each
time.  FCGI is designed to work "like" CGI, with minimal changes to your
existing script, other than putting the page handling code into a top-level
loop.  I've used FastCGI a bunch on Windows and Linux, though only with
Apache.  In addition to the cgifcgi.exe mechanism, there's an ISAPI plug-in.

Marc M. Adkins

> -----Original Message-----
> From: owner-spug-list at pm.org [mailto:owner-spug-list at pm.org]On Behalf Of
> Meryll Larkin
> Sent: Thursday, May 02, 2002 10:24 AM
> To: SPUG List
> Subject: SPUG: perl2exe perl-cgi file size problem
>
>
> 5/2/02
>
> Hi SPUGsters,
>
> I have a 14.5K perl-cgi script that generates a Web
> page.  I want to put it on an IIS Server (stuck with
> that for the moment) which is housing my domain.  This
> server has a mock cgi-bin that will run perl2exe
> files.
>
> When I compile with perl2exe, the file bloats to
> 1016K.  When I realized it was compiling all of CGI.pm
> (standard) into the exe, I stripped down the script to
> use the minimim amount of CGI that I could.  The
> script is now only using param from CGI, and all the
> rest is Perl (including 3 function calls to
> time)(mostly Perl printing complex HTML).  More than
> 300K is from CGIpm (still, even 700K is an enormous
> Web file).
>
> So, before I embark on a project more time consuming
> than writing the original script, (wading through
> CGI.pm to see if I could steal or adapt the param
> method and embed it into my script) I wanted to ask:
>
> Does anyone have any recommendations (other than
> getting off the IIS - that's for later this year) for
> me to try with my Perl script and perl2exe?
>
> Thanks,
> Meryll Larkin
>
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Health - your guide to health and wellness
> http://health.yahoo.com
>
>  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>      POST TO: spug-list at pm.org       PROBLEMS: owner-spug-list at pm.org
>       Subscriptions; Email to majordomo at pm.org:  ACTION  LIST  EMAIL
>   Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
>  For daily traffic, use spug-list for LIST ;  for weekly, spug-list-digest
>      Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org
>
>


 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     POST TO: spug-list at pm.org       PROBLEMS: owner-spug-list at pm.org
      Subscriptions; Email to majordomo at pm.org:  ACTION  LIST  EMAIL
  Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
 For daily traffic, use spug-list for LIST ;  for weekly, spug-list-digest
     Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org




More information about the spug-list mailing list