It might be cleaner for a single helper function to parse options for all of our functions instead of having the functions do it themselves. This would likely only work if all of our functions use optional arguments in the future. If any one function needs to specify a required argument, it will need to parse the options itself.
I envision the helper function putting variables for each relevant option into an accessible scope for later use by the functions that call it. Our helper function could also return the new $@ argument list that the original functions could use instead of their old $@ argument list.
This would make using options significantly easier and cleaner.
It might be cleaner for a single helper function to parse options for all of our functions instead of having the functions do it themselves. This would likely only work if all of our functions use optional arguments in the future. If any one function needs to specify a required argument, it will need to parse the options itself. I envision the helper function putting variables for each relevant option into an accessible scope for later use by the functions that call it. Our helper function could also return the new $@ argument list that the original functions could use instead of their old $@ argument list. This would make using options significantly easier and cleaner.