Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^2: A brief survey of the DBI usability layer modules on the CPAN

by Aristotle (Chancellor)
on Nov 01, 2005 at 21:20 UTC ( #504745=note: print w/ replies, xml ) Need Help??


in reply to Re: A brief survey of the DBI usability layer modules on the CPAN
in thread A brief survey of the DBI usability layer modules on the CPAN

There’s nothing about any of that in the documentation.

Since DBIx::Simple does nothing extraordinary, I assume it works with Apache::DBI no differently than any other piece of code that uses DBI naïvely.

I can’t see that it uses connect_cached; it does expose the database handle via a getter, but there’s no way to set it or to supply your own. Supplying your own would make this and more things possible; that might make a good feature request. but you can supply your own database handle, which you can set up in any way you’d like.

As for prepare_cached, it actually uses its own caching scheme for statement handles; but it does not use prepare_cached. I don’t know what the motivation behind this is, so there may or may not be a good feature request to be made here.

Makeshifts last the longest.


Comment on Re^2: A brief survey of the DBI usability layer modules on the CPAN
Re^3: A brief survey of the DBI usability layer modules on the CPAN
by Mutant (Priest) on Nov 02, 2005 at 11:08 UTC
    I canít see that it uses connect_cached; it does expose the database handle via a getter, but thereís no way to set it or to supply your own. Supplying your own would make this and more things possible; that might make a good feature request.
    I haven't used DBIx::Simple (and am now looking in to it), but a quick glance at the docs has this constructor:

    DBIx::Simple->connect($dbh)

    I would assume this could be used to pass your own DB handle created via connect_cached.

    ++ for a good writeup. I'd definitely be interested on your thoughts on Class::DBI, and a comparision between it and DBIx::Simple.

      D’oh! I even wondered how it could be that Juerd would miss such an obvious and obviously useful feature, and checked the docs multiple times – but didn’t see it. Sometimes I really have a blind spot. Thanks for pointing out the blunder, I fixed my node.

      As for a comparison with Class::DBI – there’s just not much to compare. DBIx::Simple is a very thin layer on top of DBI which doesn’t fundamentally affect the way you work, it just adds a good helping of readability and makes some things a smidgen easier. So DBIx::Simple is to Class::DBI exactly as DBI also is to Class::DBI.

      Makeshifts last the longest.

Re^3: A brief survey of the DBI usability layer modules on the CPAN
by Juerd (Abbot) on Jun 13, 2007 at 21:35 UTC

    As for prepare_cached, it actually uses its own caching scheme for statement handles; but it does not use prepare_cached. I donít know what the motivation behind this is

    prepare_cached caches sth objects not caring whether the sth has finished already. You might be executing a sth that was still in use somewhere else. This leads to all kinds of interesting bugs :)

    Juerd # { site => 'juerd.nl', do_not_use => 'spamtrap', perl6_server => 'feather' }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://504745]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (10)
As of 2014-09-18 20:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (124 votes), past polls