>>> CGI.pm. That said, how does CGI.pm handle this situation? If I call
>>> $query->header(-cookie=>{...}) multiple times does it aggregate your
>>> cookies? If not, than it's not a CGI-App problem -- it's a CGI.pm
>>> problem.
I think it's a CGI::App problem. CGI.pm is designed for building web
pages, while CGI::App is designed for building re-usable applications.
So CGI.pm never accumulates header() properties, it's always a one-shot
deal. On the other hand, CGI::App is designed to handle process a set of
pages, which may share common properties.
I think Cees gave the most likely example already: There may be a cookie
you want to set on every page in a CGI::App project.
>> header_props - works as is
>
> Keeping header_props unchanged sounds like a good idea in order not to
> break things.
I think I prefer to move forward with allow header_props to be called
multiple times.
>> header_add - add a header of this type to the current list
>> header_set - replace the current header of this type
I don't think we need these when header_props can be called more than
once. I think we just need "add_cookie" to add additional cookies.
As an alternative, perhaps we could leave header_props alone, but /just/
add the "add_cookie" function, to cover the most common case.
Finally, I'll mention the solution that doesn't involve any code
changes: You can accumulate your headers in your own data structure, and
pass that to header_props() once at the end.
I think my vote is for "multiple header_props + add_cookie".
Mark
--
http://mark.stosberg.com/
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/suppressed/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.