Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re^2: How do I prototype a function with a varying number of arguments?by lyapunov (Novice) |
on Jul 29, 2011 at 19:39 UTC ( [id://917530]=note: print w/replies, xml ) | Need Help?? |
Thank you all for the responses! JavaFan, thanks for the quick insight! AnomalousMonk, I have considered the question of using them, especially after reading Tom Christiansen's article but the reason that I use try to use them is that it sometimes helps me, in the same way using strict vars does. If I forget to feed a function call the needed requirements it lets me know. Truth be told, my learnedness and ability in Perl are below the threshhold where I think I will start seeing some of the bad juju. koolgirl, the reason that I use prototypes is two fold, with strict it helps me debug crappy little things like tranpsosition errors, and it has been forcing me to think harder about what I want to feed it. The article linked above is really well written, but as I said, for me the juice is worth the squeeze as it helps with accounting problems on my end. The other big push for me to build this library is that I am currently having to write a fair amount of code that does metrics from several different sources that need to be compiled together or have other special needs. I was beginning to see common refrains in the needed work. I do the write it once and revise, but I am enjoying the aspect of trying to write it in the most useful way possible first and see if I can anticipate unseen needs or problems and guard against them. Also, having seen a myriad of ways that people hobble together the same information, trying to anticipate those has been an even bigger pay off. In ways, I think this has helped me and my coding style quite a bit. But, I am boring geek, so I guess it goes with my territory.
In Section
Seekers of Perl Wisdom
|
|