Gabor Szabo:
>Hi,
>
>I am new to Maypole and to the list.
>Trying to put together a CGI::Maypole application.
>
>I was trying to send cookies but could not find a way so far so I
>override function of CGI::Maypole in order to be able to do so.
>Here is the new function:
>
>
>sub send_output {
> my $r = shift;
>
> print $r->{cgi}->header(-type => $r->{content_type},
> -content_length => length $r->{output},
> -cookie => $r->{cookie},
> );
> print $r->{output};
>}
>
>This works but maybe I just missed the existing way to set the cookie ?
>
>
Well, there are two nice modules at CPAN,
Maypole::Authentication::UserSessionCookie and
Maypole::Authentication::Abstract, but both require Apache::Cookie at
the moment.
It should be easy to make them usable with both CGI::Maypole and
Apache::MVC.
When i get some time i will see what i can do for my
Maypole::Authentication::Abstract.
Btw. Who is the new maintainer of
Maypole::Authentication::UserSessionCookie?
>
>
>In any case it would be nice if I could change all the headers (e.g. I
>am sure I'll want to change the charset parameter in some of my
>applications) without overriding this function.
>Maybe to prepare the additional parameters for the header like this
>
> $r->{header} = {-charset => 'utf8', cookie => $cookie};
>
>and then replace the function in CGI::Maypole with this one:
>
>sub send_output {
> my $r = shift;
>
> my %header = {
> -type => $r->{content_type},
> -content_length => length $r->{output},
> };
>
> %header = %{$r->{header}};
>
> print $r->{cgi}->header(%header);
> print $r->{output};
>}
>
>
>
Yes, a simple header interface would be nice.
It's now on the todo list...
>
>
>Gabor
>
>_______________________________________________
>maypole mailing list
>maypole at lists.netthink.co.uk
>http://lists.netthink.co.uk/listinfo/maypole
>
>
>
Cheers,
Sebastian
_______________________________________________
maypole mailing list
maypole at lists.netthink.co.uk
http://lists.netthink.co.uk/listinfo/maypole
This archive was generated by hypermail 2.1.3 : Thu Feb 24 2005 - 22:25:56 GMT