Write a ‘flash’ helper 

sub flash {
    my($message, %opt) = @_;

    my $span = 'span' . ($opt{span} || '12');
    $span   .= ' offset' . $opt{offset} if $opt{offset};
    session flash       => $message;
    session flash_span  => $span;
}