CGI is not so hard

Discussion in 'Perl Misc' started by Jürgen Exner, Aug 16, 2003.

  1. -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    Yeah, I've read that too. I'm not sure I believe it. CGI.pm has 6700
    lines in it, but fewer than 700 of them are compiled at startup. 3200
    lines are POD documentation, located after the __END__ marker, so they are
    ignored by the parser. The remaining 2700ish lines are subroutines which
    are compiled only the first time they are invoked by user code.

    So I don't see the problem, and in the real world, I haven't particularly
    noticed a problem with CGI.pm's speed. (Especially if you use mod_perl or
    FastCGI).

    - --
    Eric
    $_ = reverse sort $ /. r , qw p ekca lre uJ reh
    ts p , map $ _. $ " , qw e p h tona e and print

    -----BEGIN PGP SIGNATURE-----
    Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>

    iQA/AwUBP0F+AWPeouIeTNHoEQLhPACfc1GMpAjk22IorKnKKB88EjMHmJkAn3e+
    Up4kKPR0wjWbuWf+GaEVHnzi
    =b653
    -----END PGP SIGNATURE-----
     
    Eric J. Roode, Aug 19, 2003
    #21
    1. Advertisements

  2. Jürgen Exner

    hudson Guest

    Thanks Juha for that post and you definitely made some great points
    about the dangers of cuting and pasting code in a production
    environment.

    I'm still not 100% with you on CGI.pm. People around here seem very
    loyal to it, but I have read in a lot of different places that it is
    too large and slow, etc.
     
    hudson, Aug 19, 2003
    #22
    1. Advertisements


  3. Large, slow and correct vs. small, fast and incorrect.

    Choose one.


    [ exaggerated to make a point ]
     
    Tad McClellan, Aug 19, 2003
    #23
  4. Jürgen Exner

    hudson Guest

    Hi Bill,

    I didn't deal with $key because I checked for a match for $key and I
    wrote the html form. If a key is unexpected, it won't match, so there
    are no worries:

    my @form_variables= qw(variables_1
    variables_2
    etc
    );

    and later:

    for my $variables (@form_varibles) {
    if ($key eq "$varible") {
    $kv{$key} = $value;
    }
    }
     
    hudson, Aug 20, 2003
    #24
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.