in reply to mason request scope variable
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.<%cleanup> print "Cleanup"; </%cleanup> <%init> print "Init"; #This is an alias to $m->out(); </%init> <%filter> print "Filter"; </%filter> <%perl> print "Perl"; </%perl> <%once> print "Once"; </%once>
Hope this helps you.<%perl> my $session=$m->comp('/mason/session/session.mas'); $m->call_next(session=>$session); $m->comp('/mason/session/session.mas', action=>'save', session=>$sessi +on); </%perl>
|
|---|