Help! - Need a CGI redirect which passes a querystring value

W

Woody PurlGurl IV

Matt Garrish said:
I never said it was the only way. You jumped at the chance to trash CGI.pm
and posted some garbage. I pointed out you were wrong. I never said anything
to the people who posted workable solutions

Get a grip. Though my code, which I guess I should have said was
untested, was certainly not perfect, I don't think it was "garbage"
either, especially considering the underlying concept -- avoiding the
overhead of CGI.pm for a one-off script -- was a valid argument.

And I _never_ "jumped at the chance to trash" CGI.pm. First of all, I
am not so personally wound up with CGI.pm, as you seem to be (which is
quite odd considering your last name is not Stein), that I jump at the
chance to either trash or defend it. I just pointed out that this
might be a situation where it was inappropriate. If in your world
view that is "trash"-ing, get thee to a psychiatrist.
 
M

Matt Garrish

Gunnar Hjalmarsson said:
Don't take for granted that mod_perl is an available option. The OP in
this thread used the wording "the Windows server I am hosted on".

Granted, but my point was simply that that line of argument is fast becoming
out-dated.

Matt
 
M

Matt Garrish

Woody PurlGurl IV said:
Get a grip. Though my code, which I guess I should have said was
untested, was certainly not perfect, I don't think it was "garbage"
either, especially considering the underlying concept -- avoiding the
overhead of CGI.pm for a one-off script -- was a valid argument.

And I _never_ "jumped at the chance to trash" CGI.pm. First of all, I
am not so personally wound up with CGI.pm, as you seem to be (which is
quite odd considering your last name is not Stein), that I jump at the
chance to either trash or defend it. I just pointed out that this
might be a situation where it was inappropriate. If in your world
view that is "trash"-ing, get thee to a psychiatrist.

So calling it cargo cult code is not a bad thing? Recommending the CGI
module is a better alternative to half-baked attempts at cgi coding. If you
can't even take the time to check your code, please don't post it here.

Matt
 
R

Randal L. Schwartz

Gunnar> Don't take for granted that mod_perl is an available option. The OP in
Gunnar> this thread used the wording "the Windows server I am hosted on".

mod_perl works fine on Windows Apache.
 
G

Gunnar Hjalmarsson

Randal said:
mod_perl works fine on Windows Apache.

You misunderstood me, Randal. "Hosted" was the intended keyword. It's
(unfortunately) very unusual that mod_perl is available to web sites
on shared servers (whether the platforms are *nix or Windows).
 
W

Woody PurlGurl IV

Matt Garrish said:
So calling it cargo cult code is not a bad thing? Recommending the CGI
module is a better alternative to half-baked attempts at cgi coding. If you
can't even take the time to check your code, please don't post it here.

A) Who cares if "calling it cargo cult code" is a "bad thing"? What
is this, kindergarden? Mr Stein, Mr Stein, somebody called CGI.pm
cargo cult code. Grow up.

B) I didn't intend to call CGI.pm "cargo cult code". I was referring
to its usage in the given context. I use CGI.pm all the time,
including along with HTML::Template, within the context of
CGI::Application. Its just that I'm convinced that in the OP's
context it was needless.

C) I called MY OWN code, or at least one line of it, cargo cult code.
This is called self deprecation. If you can't even take the time to
have a sense of humor don't post here. ROTFLMAO.

C) Regardless of my code not being perfect, the concept that CGI.pm
could perhaps be overkill in this situation was the crux of my post.
You refuse to acknowledge this, apparently because you'd have to admit
you're not perfect. The code's the easy stuff: if its slightly off,
its easy enough to fix, as this very thread demonstrated. Recognizing
mis-applied concepts is substantially harder. I'm probably wasting my
breath though, you don't seem to get it.
 
M

Matt Garrish

Woody PurlGurl IV said:
C) Regardless of my code not being perfect, the concept that CGI.pm
could perhaps be overkill in this situation was the crux of my post.
You refuse to acknowledge this, apparently because you'd have to admit
you're not perfect.

Yes, that must be it. This is all a contest to see who is perfect, and I win
because my code is bullet-proof whereas yours prints part of a url to the
browser. There are two solutions that work, neither of which you posted. If
you want a hand for almost getting it right, you're not going to get it from
me. If you want a debate of the merits of using CGI, as Alan noted it's a
tired argument you're welcome to have with yourself.

Matt
 
W

Woody PurlGurl IV

Matt Garrish said:
Yes, that must be it. This is all a contest to see who is perfect, and I win
because my code is bullet-proof whereas yours prints part of a url to the
browser. There are two solutions that work, neither of which you posted. If
you want a hand for almost getting it right, you're not going to get it from
me. If you want a debate of the merits of using CGI, as Alan noted it's a
tired argument you're welcome to have with yourself.

What I tried to engage in was a debate on the merits of using CGI,
_in_this_particular_situation_. All you've done is sink your teeth
into the fact that my code was not perfect. I feel sorry for your end
users, considering you apparently are incapabable of considering
tradeoffs; everything looks like a nail to you cause the only tool you
have is a hammer.

PS....here is my response to you insisting on having the last word:

<fingers_in_ears>
LALALALALALALALALALA
</fingers_in_ears>
 
K

krakle

Whoa! Isn't this _precisely_ the sort of situation where CGI.pm is
overkill? After all, all this takes is regex substitution on a cgi
environment variable:

$ENV{REQUEST_URI} =~ s/myPage.cgi/myPage.aspx/;
$redirect = "http://" . $ENV{HTTP_HOST} . "/" . $ENV{REQUEST_URI};
print "Content-type: text/html\n\n";
print "Location: $redirect";


haha... nice try.
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top