Marcos Lorenzo de Santiago wrote: > But why? Is there any reason for not doing this? I guess maybe security > problems? or unexpected script behaviour?
Good start. If you went to the trouble of verifying each and every argument before you created a var out of it (maybe using a pre-defined list of legal values) you could limit the downside of the errors you could get. The interpreter is going to eval whatever you tell it to and if there were a way to feed an evil config file to your program, it could be disastrous. I would trust an eval if it was only my code that was being eval'd, but not from an external source. eval has it's uses, mostly for trapping errors in sub-code and debugging, but most people avoid it in regular code. There are differences between V4 and V5 and memory leak problems that you could encounter; plus the fact that you're adding a level of complexity to your code. I'd still recommend using a short hash name instead and also be careful of what 'value' these vars/keys can take on from the config file. -- ,-/- __ _ _ $Bill Luebkert Mailto:[EMAIL PROTECTED] (_/ / ) // // DBE Collectibles Mailto:[EMAIL PROTECTED] / ) /--< o // // Castle of Medieval Myth & Magic http://www.todbe.com/ -/-' /___/_<_</_</_ http://dbecoll.tripod.com/ (My Perl/Lakers stuff) _______________________________________________ Perl-Unix-Users mailing list Perl-Unix-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs