Sure you are allowed to be creative. The problem is when the code you write does not work robustly because you make too many assumptions. If you reinvent the wheel, then the one you make should at least be round as well.
And to be honest, I use CPAN modules for exactly the same reason I use Perl: because I'm too lazy to take care of everything myself. Others have spent a good amount of time creating solutions that work reliably and don't trip over unusual input. Why should I go to the trouble of reimplementing all of that for what conceptually is a very simple task?
Like in my previous node on this thread: I want the hostname from a URL. So I just take a module and say "I want the hostname". And now I know that whatever URLs I ever throw at it, it will always work right. Even if I throw a gopher:// at it. Or something else I never thought of when I was writing the script. It doesn't break.
And if I really do want to implement a hostname URL extraction, I have the module's source to read.
Makeshifts last the longest.
|