more useful options | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
As the previous respondent pointed out, this is more in the area of personal style preference, but I also agree with him that the nature of the situation you describe lends itself to the hash-table/named-args approach. When I write subroutines, I give some time to consider (a) the scope of the routine itself (not in the lexical sense, but in the sense of, "How big and significant is this likely to become?"), and (b) easy will it be to document clearly for the sake of other users? For that matter, the "other users" question can often be a deciding point-- one utility-script I package with RPC::XML uses long lists of parameters between routines, but no one else is going to use that routine independantly, it will only ever be part of the utility script (which harkens back to the "scope of use" question). I realize this is no more a definative answer than the previous post was, because this is not an absolute cut-and-dried situation. However, just for arguments' sake, I'll say that in my opinion you should go with the hash-table approach for the situation you specifically describe. --rjray In reply to Re: Accessing Subroutine Arguments
by rjray
|
|