That is indeed an option, but I'm of the school of thought that it's better for a program or operation in a program to silently catch an error and correct it for the user than to just fail outright.

...and I'm of the school of thought that a program should silently toil away doing it's appointed task until it encounters something it's not expecting, at which point, it should be noisy as hell. Fixing something for the end user is not always the best solution, because what if your notion of "fixed" is different than what the user had in mind? The road to crufty code becomes short indeed.

On the other hand, if you want to subsribe to the "be liberal in what you accept and strict in what you output" philosophy (which is what I think you were getting at), that's fine, just don't do it silently. Document every feature that you have coded (as well as known limitations, bugs, etc...)

thor


In reply to Re: Re: Re: Re: (jeffa) 3Re: My first stab at OO perl... by thor
in thread My first stab at OO perl... by Theseus

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.