Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re: Simple DBI handle caching.

by Your Mother (Archbishop)
on May 11, 2011 at 17:28 UTC ( #904201=note: print w/replies, xml ) Need Help??

in reply to Simple DBI handle caching.

...don't need or want the ache of defining a schema...

Schema generation with DBIC is generally trivial. Some special needs can definitely be a pain for a novice with the kit, I know. I'm not saying you need to use DBIC but it's really quite excellent and in the past your code style and mine have lined-up well so I recommend it to you.

Take a look at these goodies (assuming you haven't already)–

Replies are listed 'Best First'.
Re^2: Simple DBI handle caching.
by kyle (Abbot) on May 11, 2011 at 17:52 UTC

    I've generated a schema from an existing database before, and I agree it's pretty easy. What it came up with was a tree full of files that described every field of every table in the database. I want to avoid that for a couple of reasons.

    1. The database I'm working with is old and huge and has been through a lot of bad design. I'd be surprised if the result "just works."
    2. The program I have is just one file, and I'd like to keep it that way.
    3. The environment I'm in is mostly "not Perl." I'm writing this as a sysadmin outside the support of the developer population, so I can expect future database changes behind my back.

    All of the work of my little program is done in one table. I have one SELECT and one UPDATE (each run many times with different parameters), and that's it. I'm not doing a ton of ugly stuff that DBIC would save me.

    Anyway, it looks like DBIx::Connector will do what I want, and my quick hack works too. If DBIx::Class can do the job without tangling me up in future work, I'd love to learn how.

    As an aside, I'm touched that you remember me after all my absence.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2021-06-19 15:04 GMT
Find Nodes?
    Voting Booth?
    What does the "s" stand for in "perls"? (Whence perls)

    Results (92 votes). Check out past polls.