Re: [Maypole] Todo

From: Simon Flack (sf at flacks.net)
Date: Mon Sep 06 2004 - 18:50:08 BST


On Mon, 6 Sep 2004 18:20:06 +0100, Simon Cozens wrote
> chromatic:
> > > * put POST and GET data in $r->{params} and deprecate $r->query
> >
> > Actually, the lack of encapsulation there drives me crazy. If it were
> > up to me, I'd hide everything in $r behind nice method names instead of
> > going the other way around.
>
> The fact that Maypole uses ->{x} sometimes rather than ->x is
> nothing to do with encapsulation, and everything to do with the
> facts that (a) I was micro-optimizing, and (b) I didn't really know
> what accessor methods I needed added for the $r slots and was just
> making stuff up as I went along, and hence was too lazy to add it
> back to ->mk_accessors.
>
> The universal fix is to change ->{foo} to ->foo and put "foo" in the
> mk_accessors list, for all values of foo.

But not for param(). param() IMO, should call $r->get_request->param(). That'd
work at least for Apache::MVC and CGI::Maypole. You'd probably need something
cleverer for Maypole::CLI.

_______________________________________________
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