in reply to Love/Hate Internet Explorer
Now, I'm wondering if there's a reasonable solution that we can at least do with perl and CGI.pm; that is, when you create a new CGI object, there should be a flag that is set when header() is called. If the object is destroyed while this flag is unset, then a warning/die() should be issued that a header was not sent, and there *may* be erroneous code around (lacking a header line). Obviously, I'd opt to have this as an option that must be set to work, as opposed to a default out of the box. And it's certainly not infallable: this code will not trigger the warning despite header() being called:
my $q = new CGI; $q->header( 'plain/text' ); # It's not being printed!
(Actually, thinkning about it, I'd figure it would be just as easy to create a class such as CGI::HeaderHunter, which acts like a CGI object, but incorporates a "header()" override function and provides a new DESTROY call. Instead of creating a CGI object, you'd create this one. Not quite sure on the details yet, of course...)
-----------------------------------------------------
Dr. Michael K. Neylon - mneylon-pm@masemware.com
||
"You've left the lens cap of your mind on again, Pinky" - The Brain
"I can see my house from here!"
It's not what you know, but knowing how to find it if you don't know that's important
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(Ovid) Re: Re: Love/Hate Internet Explorer
by Ovid (Cardinal) on Nov 30, 2001 at 04:04 UTC | |
by Fastolfe (Vicar) on Nov 30, 2001 at 04:29 UTC |