I was wondering why it didn't seem to matter that $self was always in the arguments... Really the reason they were there was to remind me of their usage. What do most people do?
Something like this?
sub loadEttx(){#scalar file name
| [reply] [d/l] |
For small projects self-documenting code usually works well enough. Choose good variable names and append descriptors like "_aref" for array references, "_href" for hash references, etc. If you are passing a lot of variables in or you feel like you need to heavily document what is being passed in then you could probably do with so some code code refactoring. An obvious one is if you are passing in a lot of variables then think about putting them into a hash and then just passing in a reference to the hash instead (this also makes it easier to add new variables/hash entries as your code evolves). If you want some additional documentation then put in some POD above the subroutine explaining what is does, what it takes/expects, returns, etc. You might also want to check out Perl Best Practices.
Elda Taluta; Sarks Sark; Ark Arks
| [reply] |