in reply to
mason request scope variable
I use Mason for almost everything I write to web. The way I usually do this is by passing the session variable as parameter to the $m->call_next(session=>$session);
However, I don't use <%init>, <%once>, <%cleanup> or <%filter> (I used <%filter> once). The main reason I don't use them is that the code turn into a less predictable code.
For instance, in this code:
print "Init"; #This is an alias to $m->out();
Can anyone say which of the blocks will be called first? I don't, and don't want to be always looking for the next (or previous) code block, so I just use (most of the time) the <%perl> and <%args>. You can do everything you need using just this too, and your code is a lot more linear.
For situations identical to yours, my code usually looks like (in the autohandler):
$m->comp('/mason/session/session.mas', action=>'save', session=>$sessi
Hope this helps you.