Several comments:

I really don't think this warrants a new top-level namespace in CPAN. Especially since there is the DBIx:: space for exactly this sort of thing.

Also - have you looked at DBIx::AbstractLite, DBIx::Recordset, DBIx::Record, DBIx::TableHash, Class::DBI, etc. which all do very similar things.

I agree with the comments that others have made on the connection syntax. Naming the method after the database doesn't give you any obvious advantages. It gives you disadvantages because of possible method clashes and the need to eval code.

What is the disadvantage you see in having the database as a parameter to a connect method?

You could make your loops a little more compact if the query didn't fetch the first item and move_next returned false when there were no more records to be fetched. You could then write:

$rs = $conn->query("SELECT * FROM test"); while($rs->move_next) { print $rs->field("client") . "\n"; $rs->field("client", "test"); }

Finally, it only seems to work properly if you select * which is something many people never do since it's needlessly expensive when you only need some fields.


In reply to Re: DBX offers simplified access to the DBI by adrianh
in thread DBX offers simplified access to the DBI by batkins

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.