in reply to passing subroutine args as a hash: why not?
Seen as 61 arguments, the idea sounds more than faintly ludicrous. Seen as a function that processes a record containing 61 fields, maybe less so, provided that the hash is built automatically by some prior piece of code. If the coder has to build the hash either in-line, or specifically for the purposes of calling the sub, then it is ludicrous and should be refactored.
Maintaining such a record internally in the form of a hash mkes perfect sense. Passing the hash to the subroutine that processes it doesn't. Pass a reference to the hash. What waste all those cycles flattening a nicely structured hash into a list only to rebuild the list into a hash inside the sub?
|
|---|