Is CPAN DBI the best database interface to use in Perl for general database use? Are there some better options?
If you're just looking for low-level database access—you feed it any SQL string (optionally with place-holders and bind values) and it runs your query and gives you back the results—then yes, DBI is your best bet, by far.
If you want a higher-level interface (i.e., one that requires little or no use of raw SQL in your code) then there are several ORMs (object-relational mappers) available for Perl. Check out the ORM page at the Perl Foundation's Perl 5 wiki for more information and links. (If you want help choosing among them or have specific questions, you could narrow the focus of this question or perhaps post another one.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With