|go ahead... be a heretic|
ref, no, maybe?by Ovid (Cardinal)
|on Jan 11, 2001 at 04:07 UTC||Need Help??|
Ovid has asked for the wisdom of the Perl Monks concerning the following question:
Without naming names and starting another CB log/nolog war (just kidding), I noticed some well-respected monks asserting in the CB that most uses of ref were wrong. Essentially, ref if used for deep magic that is beyond the means of most monks (such as this blowhard, for example).
Recently, I found a need to create a query string based upon some data in a hash. I couldn't find a module that did this, so I wrote the following:
This code is very specific to my needs and does not guarantee to be appropriate for all uses. For example, whether or not a name is sent when there is no corresponding value depends upon the type of input field. Also, error checking is handled long before this routine gets the data, so this code is NOT robust. If you want it, use at your own risk.
So, putting those issues off to the side, is there something wrong with my use of ref here, or is there a better way to approach this?
Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.