[cgiapp] Re: header_props after header_type (was: cgi_minimal compatible?)

2003-11-02 Thread Mark Stosberg
On 2003-11-02, Mark Fuller [EMAIL PROTECTED] wrote:
 I've been using cgi::application (and html::template) for the last few days.
 Wow, this is the cloest thing to perfection I've seen.

 I believe the documentation should note that header_props should be set only
 *after* header_type. I was setting my cookie after creating a session
 tracking object. But, in some cases I would redirect the page later in the
 method. It took me awhile to figure out why my cookie wasn't set. I think
 it's ok to expect me to set the cookie later in my method. But, it would be
 nice if the documentation noted that the header_type must be set first.

Mark,

I believe your finding is incorrect. I wrote a test case to illustrate
that setting header_props before header_type works fine. It's available
as a patch to CGI::App 3.1 here:
http://mark.stosberg.com/Tech/perl/cgiapp_header_type_test.patch

If you continue to feel there is a bug here in the code or docs, I
encourage you to make a modification of my test case that illustrates
it.

Mark


-- 
http://mark.stosberg.com/ 


-
Web Archive:  http://www.mail-archive.com/[EMAIL PROTECTED]/
  http://marc.theaimsgroup.com/?l=cgiappr=1w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [cgiapp] Re: header_props after header_type (was: cgi_minimal compatible?)

2003-11-02 Thread Mark Fuller
From: Mark Stosberg [EMAIL PROTECTED]
 I believe your finding is incorrect.

I think you are correct. Now I believe that I overlayed my header_props by
setting one property (a cookie) and then setting it again with the
redirection URL. (I thought that setting the header-type to redirect did it.
But, it looks like it was setting the redirection URL that caused the cookie
to be lost). I thought the header_props values could be set incrementally.
It looks like they have to be set all at once? And that's probably a
function of CGI.pm. (I'm actually using CGI::Simple).

Thanks,
Mark


-
Web Archive:  http://www.mail-archive.com/[EMAIL PROTECTED]/
  http://marc.theaimsgroup.com/?l=cgiappr=1w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[cgiapp] Re: header_props after header_type (was: cgi_minimal compatible?)

2003-11-02 Thread Mark Stosberg
On 2003-11-02, Mark Fuller [EMAIL PROTECTED] wrote:

 I think you are correct. Now I believe that I overlayed my header_props by
 setting one property (a cookie) and then setting it again with the
 redirection URL. (I thought that setting the header-type to redirect did it.
 But, it looks like it was setting the redirection URL that caused the cookie
 to be lost). I thought the header_props values could be set incrementally.
 It looks like they have to be set all at once? And that's probably a
 function of CGI.pm. (I'm actually using CGI::Simple).

I would call that a bug or missing feature in CGI::App. Someone else
has already identified it and submitted a patch to the maintainer.

We'll hope it appears in a new release soon-- I think the behavior you
expected is the more intuitive one.

If you are already sub-classing CGI::App, you could add a header_props
routine to your class that behaves how you expect. 


Mark


-- 
http://mark.stosberg.com/ 


-
Web Archive:  http://www.mail-archive.com/[EMAIL PROTECTED]/
  http://marc.theaimsgroup.com/?l=cgiappr=1w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]