on-internet
← Community

How to avoid passing too many parameters to a function? [closed]

Stack Overflow ·

I have a function that has too many parameters, and I feel such a function is not easy to read and use. My function is used to get values like name, age, etc., to search a database. I have viewed the resolving approach in PHP that passes a class object into the function instead of many parameters. Is there a similar approaches with Perl?

Comments

Sign in or sign up to comment and upvote.

No comments yet.