I think what happened here is a combination of two things.
For one, undeniably, your teacher made silly restrictions and demands. I've met a lot of people who teach a subject they know well, but don't understand well. They have learned a few dogmata like mantras, and apply them regardless of cost or situation. So long as they stick to the environment these dogmata were made for, that usually is not a problem, however as you have seen, it can crash and burn big time as soon as you have to adapt..
And then I also believe you tried to translate your simple script too straightly to OO. I don't see how a simple task can require so much copypaste code if you start out with the proper design right away. Throw away the concepts of the initial script and ask yourself how to model your task using classes - you should end up with a lot less code. OO design is very different from writing straight procedural code.
Of course, without nothing to actually look at, I can't know for sure.. but from the looks of it, it's both.
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.