I have the following code
#!/usr/bin/perl -w use strict; use DBI; my $trace_level=2; DBI->trace($trace_level); my $driver = 'ODBC'; print qq(DRIVER:$driver\n); my @data_sources = DBI->data_sources($driver); foreach my $source (@data_sources) { print qq( SOURCE:$source\n); }
Which generates the following output
DBI 1.13-nothread dispatch trace level set to 2 -> DBI->install_driver(ODBC) for perl=5.00405 pid=29564 ruid=500 e +uid=500 install_driver: DBD::ODBC loaded (version 0.27) <- install_driver= DBI::dr=HASH(0x8144e48) -> data_sources for DBD::ODBC::dr (DBI::dr=HASH(0x8144e48)~0x816ec +8c) Out of memory! -> DBI::END -> disconnect_all for DBD::ODBC::dr (DBI::dr=HASH(0x8144e48)~0x816 +ec8c) <- disconnect_all= '' at DBI.pm line 424. <- DBI::END complete -> DESTROY in DBD::_::common for DBD::ODBC::dr (DBI::dr=HASH(0x816 +ec8c)~INNER) <- DESTROY= undef during global destruction. DRIVER:ODBC
What I would like to know is what the "Out of memory!" message is about.
I see from perldoc DBI that

"Note that many drivers have no way of knowing what data
sources might be available for it, and thus typically,
return an empty or incomplete list."

But why should this function call be causing the "Out of Memory"
message?

In reply to Problem with DBI->data_sources() by ColtsFoot

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.