Gunnar Hjalmarsson <[EMAIL PROTECTED]> wrote: : Charles K. Clarkson wrote: : : Gunnar Hjalmarsson wrote: : : Besides, is a file scoped CGI object better than a file : scoped hash?
I always pass $q. Or if I am not changing it, I have sometimes created a new object when needed in subs. But you can just as easily pass a hash ref. Using a file scoped hash throughout the script promotes the use of "global" variables. I avoid routinely breaking the rules I suggest beginners follow. Were I to break those rules in my own scripts without excellent reason I would find it difficult to enforce them here. : : Had the author not relied on the hash to begin with, he might : : have developed better programming skills for operating with : : objects. Relying on the hash will certainly help him to avoid : : those skills. : : Personally I find it much more important that beginner CGI : programmers focus on things like validating the input properly : and dealing with tainted mode. OOP is good to know, too, but : not really necessary for handling CGI data, right? I agree about the relative importance, but I don't agree with downplaying less important topics. I attempt to stress avoidance of all habits I find to be poor programming habits. I appreciate it when other experienced people, like you, point out when my opinion is more my style than a hard rule. HTH, Charles K. Clarkson -- Mobile Homes Specialist 254 968-8328 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>