Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re: LWP vs CGI

by perlplexer (Hermit)
on Apr 24, 2003 at 11:22 UTC ( #252851=note: print w/replies, xml ) Need Help??

in reply to LWP vs CGI

Are you referring to CGI the module or CGI the interface?
In either case, CGI has nothing to do with LWP.

Follow the links, read the docs (at least the Description/Intro sections). That should clarify things.


Replies are listed 'Best First'.
Re: Re: LWP vs CGI
by Ovid (Cardinal) on Apr 24, 2003 at 14:24 UTC

    With all due respect, please don't direct people to the CGI101 Web site. While the information generally seems to be correct, the Perl is simply awful and the author uses the standard broken method of parsing form data.

    read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $FORM{$name} = $value; }

    Right off the top of my head, I count six bugs (or limitations, depending upon one's point of view) in that code. Dangerous stuff to recommend :)


    New address of my CGI Course.
    Silence is Evil (feel free to copy and distribute widely - note copyright text)

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://252851]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2023-03-20 15:16 GMT
Find Nodes?
    Voting Booth?
    Which type of climate do you prefer to live in?

    Results (59 votes). Check out past polls.