% my $pageid = stash('pageid') || '';

% if (my $user = session('username')) { % } else { % }