SPUG: Re: perl2exe perl-cgi file size problem

Meryll Larkin humbaba9 at yahoo.com
Thu May 2 17:01:52 CDT 2002


5/2/02

Thanks Everyone,

I'm going to put this away and look at it later next
week, with fresh eyes.

Here's the sticky piece of my script:

my $selectedYear = param('year') || $year;
my $selected Month = param('month') ||
$months[$monIndex];

I did install both CGI::Lite, and CGI::Minimal and was
puzzled as to why neither seemed to be able to handle
that code.  Or maybe there is more to this than I
know?  They ARE installed in my path.

I have 2 reasons for wanting a smaller file size:
1.  I have a large site already and don't want to be
paying for more ram or make any changes right now
because I'm planning to ditch IIS soon.

2.  I *assumed* (perhaps wrongly) that the reason the
script was hanging on the Web and not downloading
completely was due to the size of the file.  Now, I'm
not so sure.  It downloads the background and hangs.

I also tried Ken's code and wasn't able to get that to
work - although that is really more what I was looking
for.  I'm not using a form at all.  I'm just passing
the parameters tagged onto the url like so:

http://www.mydomain.com/cgi-bin/script.exe?month=May&year=June;

I've hard coded the ? = and &, so parsing is not a
problem.  The code works beautifully as a .cgi on my
localhost (Windows 2000).  So, I need to test and see
if I have use of the Apache Environmental variables on
the IIS server.

This may be one of those things that will just have to
wait until I'm ready to take the plunge and get my
Linux Apache server online.

Thanks again,
Meryll



--- Colin Meyer <cmeyer at helvella.org> wrote:
> On Thu, May 02, 2002 at 12:12:30PM -0700, Ken Clarke
> wrote:
> > 
> > ----- Original Message -----
> > From: "Meryll Larkin" <humbaba9 at yahoo.com>
> > To: "SPUG List" <spug-list at pm.org>
> > Sent: May 2, 2002 10:23 AM
> > Subject: SPUG: perl2exe perl-cgi file size problem
> > 
> > 
> > >The script is now only using param from CGI, and
> all the
> > >rest is Perl...
> > 
> > If you're just reading text form input (IE not
> uploading from a
> > multipart/form-data enctype form) and your form(s)
> don't include
> > multi-select menues or multiple check boxes with
> the same name parameter,
> > use this and and replace $q ->
> param('formfieldname') with $q ->
> > {'formfieldname'}
> 
> Modern browsers use ';' instead of '&' to separate
> parameters in the URL.
> The [deleted] code sample would not handle that, so
> it may well fail to
> just read text from a simple form input.  
> 
> I'd strongly suggest using CGI.pm instead of any
> hand-rolled solution.
> CGI.pm is incredibly robust, and correctly handles
> *all* properly
> formatted HTTP/1.0 or HTTP/1.1 requests, and runs
> correctly on platforms
> with odd line endings, etc. If you absolutely feel
> that CGI.pm is too
> bloated, then try CGI::Lite. 
> 
> If you don't wish to take my word on it, read what
> Merlyn (Randal
> Schwartz), Ovid, and Japhy have to say about it:
> 
> Merlyn on why to use CGI.pm:
> http://www.perlmonks.org/index.pl?node_id=28499
> 
> Ovid on problems with alternatives to CGI.pm:
> http://www.perlmonks.org/index.pl?node_id=28499
> 
> Japhy on the difficulties of parsing a CGI query:
>
http://www.crusoe.net/~jeffp/articles/ideas/CGI/3.html
> 
> 
> Have fun, and keep using CGI.pm,
> -C.
> 
>  - - - - - - - - - - - - - - - - - - - - - - - - - -
> - - - - - - - - - - -
>      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
> 


__________________________________________________
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




More information about the spug-list mailing list