Just a quick note that I tested some form of eval-style test and was pleasantly surprised to find that no overloaded tied methods were actually invoked by the test (as I recall). So my preference is an eval-style test that doesn't run any user code. When such is indeed possible, then it wins (or ties) at both criteria. Unfortunately, I don't have the exact check code nor test handy and I won't be likely to dive into the details of that in the immediate future, it appears. But coming up with eval-style tests that won't emit warnings and demonstrating that they don't call user code (or how little user code they call) would be useful results (hopefully from this thread).

When such isn't possible, then I wouldn't want to use your preferred test unless it came rolled up in a core module such as overload (or, next best, Scalar::Util) so that the next time this stuff changes (or a problem is found) the test is likely to get updated. Of course, that still leaves the problem of using it in a backward-compatible way. For the optimists in the crowd, that reduces to just requiring the install of an updated overload module. But getting something a ton better than what Scalar::Util has managed to provide is long overdue and would certainly be welcomed by me. :)

Updated: to note that I was testing tied items, not overloaded.

- tye        


In reply to Re^5: Reference assessment techniques and how they fail (run?) by tye
in thread Reference assessment techniques and how they fail by kyle

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.