G
Gunnar Hjalmarsson
-------^gcr said:if (!HASH{search2}) { -------^
$search = "search1 only";
}
if (!HASH{search1} && !HASH{search2}){
Something is missing there...
-------^gcr said:if (!HASH{search2}) { -------^
$search = "search1 only";
}
if (!HASH{search1} && !HASH{search2}){
Gunnar Hjalmarsson said:-------^
Something is missing there...
Sherm Pendley said:If you get "burned" by something that literally *thousands* of other people
are using successfully, giving up and blaming the module is just silly.
So? It's still awful code, regardless of how long you've been using it. It
uses global variables, for pity's sake.
You're claiming that the standard
module is somehow inferior,
when the author of the code you're using now
doesn't even know how to return a value from a subroutine?
gcr said:Line breaks - cgi.pm was inconsistent.
Sherm said:So? It's still awful code, regardless of how long you've been using it. It
uses global variables, for pity's sake. You're claiming that the standard
module is somehow inferior,
when the author of the code you're using now
doesn't even know how to return a value from a subroutine?
Gunnar Hjalmarsson said:. I have never understood why some regulars here get so
upset as soon as they see a piece of trivial CGI parsing code.
Quoth Gunnar Hjalmarsson said:As you well know, it _is_ inferior in one way: efficiency. Personally I
often use it because it's convenient, but in situations when efficiency
matters I don't. I have never understood why some regulars here get so
upset as soon as they see a piece of trivial CGI parsing code.
Tad said:Then you probably were not here when 20% of all posts here got
it "trivially" wrong (mid '90's).
Since it is not in your experience, you will never understand,
so can you quit harping on it?
Gunnar Hjalmarsson said:But hey, things have improved. A couple of years ago, when someone
revealed that they were using their own code for parsing CGI, about 10
regulars told that person that s/he was stupid. Nowadays only one or two
regulars do the same thing. ;-)
Tad said:Because there are now eight less regulars!
Charlton Wilbur said:TMcC> Because there are now eight less regulars!
Eight fewer *knowledgeable* regulars, surely.
John W. Krahn said:Probably up north helping Santa this time of the year.
Ben said:If you can do it *correctly* more efficiently than CGI.pm can,
then by all means please release your code as CGI::VeryEfficient or
something, and then the rest of us can get the benefit as well.
Quoth Gunnar Hjalmarsson said:Of course I can; just did.
http://groups.google.com/group/comp.lang.perl.misc/msg/827b6bb5568885f3
I.e. it does *correctly* what it's supposed to do. (It's not supposed to
handle e.g. multivalue fields or file uploads.)
Since there already are alternative CGI parsing modules, there is no
need to release another one.
If one of them was included in the standard Perl distro, people might
be more inclined to use it. I know I would.
Ben said:Quoth Gunnar Hjalmarsson:
I'm not really competent to judge whether it's correct, not having read
the CGI spec recently; as for 'more efficient', did you benchmark it?
Can we see the results?
Sure.
http://groups.google.com/group/comp.lang.perl.misc/msg/d922a0fabe3ce436
Then might I respectfully suggest that you point people at one of those,
instead of encouraging them to cargo-cult CGI-parsing code that a lot of
the time is either incorrect or not properly understood? It's hard
enough to get beginning programmers to understand the value of
modularity and code reuse as it is, without a whole lot of (almost
certainly spurious) argument about the efficiency or otherwise of
CGI.pm.
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. After that, you can post your question and our members will help you out.