Am 04.06.2012 15:16, schrieb simendsjo:

On Monday, 4 June 2012 at 07:07:01 UTC, Sönke Ludwig wrote:

to make it available as a normal variable. Or maybe even using
opDispatch:

param!Params.param1 = x;

alias param!Params params;
params.param1 = x;

?

Hm.. actually of course this is much simpler than using opDispatch....

struct param(Aliases){
mixin(localAliases!Aliases);
}

Hehe. Saw your checkin and though "Doh! Of course!" :) I like it.

As you note, Params is perhaps a bit too generic name. What about
DietVars or ViewVars?

I chose InjectedParams now, so that it matches 'inject' and because the
functionality is actually pretty general.. it's tempting to try to
generalize inject!() so it takes any arguments instead of just (req,
res). But thats something for the future.