in reply to named_arguments in subroutine

You described a way. Another is Params::Named or Params::Validate