I posted this message to the Q&A section, but it seems more appropriate in this section... see additional information below...

I'm using DBI with a MySQL database, and, reading through the documentation, I see the method 'selectcol_arrayref' -- when I try this method, it always returns 'undef'.

Q1: Is this method actually available?

Q2: Is there a way to determine what module is supplying an inherited method? That is, if I want to look at the code for this method, how do I determine where from it's being inherited?

Additional information: when I use selectcol_arrayref (using an SQL statement which evaluates fine in other methods), the DBI::errstr is empty, as is DBI::err -- that is, no error is occuring. However, I'm consistently getting back an 'undef' value, regardless of the query. This leads me to believe that the version of DBI that I'm using (or the MySQL driver) is somehow flawed...

I don't have root access, so I was hoping to trace the origin of this method and look at the code (if it exists -- for all I know, some AUTOLOAD statement is handling my request) -- but I'm not sure how to trace methods like this.

So... anybody know either if A: the selectcol_arrayref method is inactive in certain versions of DBI/its drivers? or B: how I can trace where this method is being originated?

Your gracious wisdom is much appreciated...


In reply to problems with DBI::selectcol_arrayref by christopherbarsuk

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.