Please allow me to defend my choice of not using a module for this...There is absolutely nothing wrong with "rolling your own", so long as you understand why you are doing it. After all, how do you think the modules on CPAN were created? While many were for new functions, others were expanding upon previously created functionality or approaching the problem from an entirely different direction (the plethora of mail modules comes to mind).
However, if you happen to be working for a company, you are doing them a disservice. If you are new to Perl, as your post suggests, then you won't write Perl code that is as stable and well-thought out as most of the modules out there. Your company has to deal with your substandard code and is probably not getting best value for what they are paying you. As a matter of simple ethics, I would recommend not "rolling your own" in a business environment without very compelling reasons.
When I use a template to achieve a result, I've learnt how to use a template, but when I do it myself I better my understanding and knowledge of perl.The above comment suggests to me that you would benefit greatly from using more modules and templates. If you don't use them, you can't appreciate how your knowledge of Perl increases through said use. Further, without those modules, Perl wouldn't be as popular as it is and you probably wouldn't be coding in it.
Much of being a good Perl programmer is being a good programmer. Learning the benefits of code reuse and modularization aren't specific to Perl, but you must understand these issues if you want to be a serious programmer. Read through the white paper for Template::Toolkit. In just fifteen minutes to half an hour of reading, you will have learned more about Web site creation and maintenance than I learned in my first six months of "doing it by hand." It covers the benefits of code reuse and modularity from a CGI perspective. Just some of the topics covered:
Don't get me wrong, I meant what I said. There is NOTHING wrong with writing your own version of modules that are already out there if you are doing this to further your understanding. I have personally written a couple of CGI parsing routines in order to better understand the CGI protocol. However, if you are inexperienced with Perl and you arte doing this for an employer (as your post and home node hint at), you are doing them a disservice. That, in my opinion, is unethical.
Cheers,
Ovid
Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.
In reply to (Ovid) Learning or being unethical?
by Ovid
in thread REGEX: muliple search and replace
by whahoo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |