On Fri, 10 Sep 2004 22:14:05 +0200, Sebastian Riedel wrote
> Just a little idea...
>
> Maybe we should provide a Maypole::Utils module full of portable
> helper functions that work with CGI, mod_perl1 and mod_perl2.
>
> use Maypole::Utils;
>
> $r->utils->remote_host;
> $r->utils->fetch_cookie(...lalala...);
> $r->utils->bake_cookie(...lalala...);
> $r->utils->add_header(...lalala...);
> $r->utils->header;
> $r->utils->param(...lalala...);
>
> This would fit very well in my concept to make everything clean and
> portable, which began with Maypole::Application....
I don't think it's a very portable design or will help people to write
portable Maypole applications.
I've already said this on the dev mailing list, but I think that param()
should be a controller method, that behaves like CGI->param and Apache::
Request->param:
http://shrunk.net/4c737123-lists.netthink.co.uk
I don't think the proposed design is portable since it ignores the other
Maypole providers: Maypole::CLI, MasonX::Maypole and Jellybean::Container::
Maypole. I think the best way you can achieve portability is for the
controller to have a well-defined, but flexible API. I'm not sure what that
is, but perhaps something like:
$r->cookie();
$r->header();
$r->param(...);
with cookie() and header() being Class::Data::Inheritable hashes of CGI::
Cookie objects and header strings.
Just a thought.
--simonflk
_______________________________________________
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