In the immortal words of Strother Martin, "what we've got here is failure to communicate!"

Long ago and far away, the main thread began with a question about passing named parameters as hash key/value pairs: the key is the name and the value is the parameter.

Subsequently, in Re^3: Preferred technique for named subroutine parameters? and in the context, I thought, of the question of the main thread, akho wrote "Try using a reference as a hash key ... ".

I think this statement is the root of my confusion, because I would paraphrase it as "Try using a reference as the name of a named parameter", and I could not (and still cannot) understand why one would want to do this.

Further along in Re^3: Preferred technique for named subroutine parameters? and in sub-threads stemming therefrom, and in Re^5: Preferred technique for named subroutine parameters? in particular, there is discussion, as I understand it, of just what happens to a reference when it gets stringified as a hash key and of how to avoid the ill-effects of this process. But I still cannot answer what, to me, seems the Basic Question: Why would one want to use a reference as the name of a named parameter in the first place?

Until I can either answer the BQ or clear up any confusion I may have about akho's original statement, I fear I am doomed to endless, hopeless wandering...


In reply to Re^10: Preferred technique for named subroutine parameters? by AnomalousMonk
in thread Preferred technique for named subroutine parameters? by Anonymous Monk

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.