in reply to text file w/o CGI

At the risk of being shunned and excommunicated by the more catholic of the monks I can say from experience that it is possible to live without the CGI module.

When I started my scripts all I was allowed on the server was Perl and a few standard modules (CGI was stripped for some unaccountable reason). I was forced to learn a little more about handling forms than I might have wanted at the time but I was able to survive.

Claude

Update It didn't take long for the --'s to start pouring in. ;-)

Replies are listed 'Best First'.
(Ovid - why not CGI.pm?) Re(2): text file w/o CGI
by Ovid (Cardinal) on Apr 05, 2001 at 15:12 UTC
    The monks who are --'ing you fall in two categories:
    1. Monks who have really studied CGI and know the problems of "hand-rolled" CGI parsing.
    2. Monks who trust those who claim to be in the first category.
    While I admit that I am no Perl guru, I definitely fall in the first category. Suggesting to someone that they can "live without the CGI module" is dangerous. The implication, if the statement is unqualified, suggests that it's okay to not use CGI.pm. Unfortunately, no one should go down that road unless the know exactly what they are doing, but the monk in question specifically stated that /s?he/ was new to Perl.

    I'll make you a deal. Post your CGI handling code and if I can't point out the problems with it, I will offer you my humblest apologies and acknowledge that you are a genius.

    I'm not trying to be rude and I hope you don't take it this way, but I am very dismayed when I see people try to suggest alternatives without a very clear reason why.

    Cheers,
    Ovid

    Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.

      I don't take your comments as rude in the slightest.
      But when some poor schmuck is stuck on a server (for reasons which may not be easily altered) which does not have CGI.pm (for god knows why) perhaps something better than "give up and go hunting for a new ISP" would be useful.

      His problem is relatively straight forward. It's not like he's trying to do file uploads. Capturing a few variables, parsing them, etc.

      Is it better to use CGI? You bet your sweet behind.
      Are there situations in which CGI just doesn't exist? Apparently.
      Should it be possible to at least limp along in those situations? I think it should.

      When a module exists that performs some function, and that module is so standard that it's part of the basic Perl install, it's a good idea to use the module.

      But when someone clearly indicates that given their situation the module is not available, perhaps an alternative to 'move' would be useful. That's my only point.

      And since I was there and did manage to make it work until such time as I was able to move to a better server I felt perhaps a little "You can get by" encouragement might be better than 100% give up and move.

      Is it better to use CGI? You bet. But when you can't for whatever reason life still goes on and it is still possible to get some work done.

      Claude

Re: Re: text file w/o CGI
by davorg (Chancellor) on Apr 05, 2001 at 13:47 UTC

    Of course you don't have to use CGI.pm to write CGI scripts. The point is, however, that there is no good reason not to do so. If your server doesn't have CGI.pm installed then you either have a very old version of Perl (in which case you should upgrade) or a web server administrator who is in need of some education.

    --
    <http://www.dave.org.uk>

    "Perl makes the fun jobs fun
    and the boring jobs bearable" - me