You can never be certain, but verily I say, I have made more errors in home brewn code than in code I loaded from CPAN.
CountZero A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James
| [reply] |
Well, for complex tasks I do prefer modules.
| [reply] |
Why bother with a module when stat is available?
Also because CountZero's example is more legible which makes it more elegant and more maintainable. I have to focus my attention more to read your code, and I would have to consult perldoc -f stat if I had any trouble with remembering what the hell falls at [9]; which I would. Positional arguments/values are good for computers but my human brain tunes out after two of them.
Maybe this is an extremely reliable module that everyone uses, but how do I know?
Try it and exercise good judgement. Read the numerous five star reviews of it on CPAN ratings. See how often it's been used in answers here by beautiful and talented monkses.
| [reply] [d/l] [select] |