Nice code review. Hopefully BUU will learn from it.

But a minor pedantic point:

If this isn't clear, any time an object uses a hash to store data, you can (usually, unless the module author was clever) access that hash by typecasting the instantiation of that object into a hash.

I'm guessing that the above was just poor choice of words but just in case a newbie reads it I wanted to clear up what appears to be a bit of confusion.

What you really mean is that any time an objects underlying data type is a hash then it can be manipulated just like a reference to a normal hash, ( there is no casting involved).  In fact due to the fact that object types in perl are orthogonal from the their data type (despite what ref() says) this statement can be generalized to say that an object reference can always be treated exactly the same as a reference to the underlying data type.  The clever bit only means that the author has used an underlying datatype (I'm guessing you meant CODE refs) that prevents introspection.

Anyway, as I said good review.

Yves / DeMerphq
---
Writing a good benchmark isnt as easy as it might look.


In reply to Re: Re: mp3 collection renamer by demerphq
in thread mp3 collection renamer by BUU

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.