in reply to Re: OOP
in thread OOP

This is a point of view that comes up every so often. While the idea of only using what you understand seems reasonable, actually it is seriously wrong for trivial reasons. If you think that you are actually doing this, then the only question is where you start lying to yourself. Because I guarantee you that that you are using stuff that you don't understand all of the time. You can't help doing so if you are getting anything useful done at all, from "Hello, World" on up.

For an instance of a past conversation like this see Modules Vs. Manual Coding. I entered that thread fairly late at Re (tilly) 3: Modules Vs. Manual Coding. (A response that was somewhat heated for reasons that ichimunki stated.)

About your code as presented, suppose that you write all of your scripts like this. Suppose that some day you have a form that managed to get over 2K of data in it. Your code would break, you would have no idea why it was broken, and if you were told why you would have no easy way to fix it. If you used CGI you would be able to change one word in one place and it all would work.

For this and other reasons, I strongly recommend that instead of trying the futile path of understanding every single thing you ever use, learn to leverage effectively off of the work of others. (Which eventually leads to the attitudes I suggest at Re (tilly) 1: What if you are not a genius?.)