That depends, I don't learn as much using a module :)
Yes you do. You learn what wheels already exist and how to use them. This is useful when you have to do something quickly, when you need to do something correctly the first time (or with minimal hassle) or even possibly to get yourself a job. A potential employer for a Perl job would hardly be encouraged to hear that you were perfectly capable of writing a directory traversal (on your say so), but could not off the top of your head write an elementary File::Find statement (which they just might test you on.)
If you really want to learn then read the source code of the module in question. You will learn far more about directory traversal by reading the source code of File::Find than you ever will learn writing your own from scratch. Being part of the standard distro the code must run on every OS that perl runs on, this means it will be written to handle all sorts of cases that you are unlikely to know of.
Now don't get me wrong. Reinventing wheels can be an extremely educational process. But doing it without a thorough understanding of the existing wheel (and frankly in this context a wheel is not a great example IMO :-) doesn't make a lot of sense.
It also introduces lots of extra code that has to be audited and maintained.
Every single module involved is part of the standard distro. If you are worried about auditing and maintaining these modules modules then you should be equivelently worried about Perl itself. If these modules have issues then they will be fixed by the P5P team. For me I would be far far more worried about my handrolled creation going subtly wrong than anything that comes with the standard distro.
Anyway, just my $0.02
---
demerphq
<Elian> And I do take a kind of perverse pleasure in having an OO assembly language...
|