in reply to DBX offers simplified access to the DBI
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.
|
|---|