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?.)
In reply to Re (tilly) 2: OOP
by tilly
in thread OOP
by Parham
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.