use v6; given $username { when 'root' { dostuff } when /^guest\d*$/ { die "You're not allowed to do stuff." } when any() { authenticate :web; dostuff } default { authenticate :local; dostuff } }