$self->helper( onlyauth => sub { my ($c,$block) = @_; if ($c->session('login')) { return $block->() if $block; } });