Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Re: Writing It Myself, DWIM, and Expectations

by Zaxo (Archbishop)
on Sep 13, 2004 at 05:06 UTC ( #390498=note: print w/replies, xml ) Need Help??

in reply to Writing It Myself, DWIM, and Expectations

The DBI table_info method should be helpful in dredging up what sort of columns your db abstraction layer is producing. The NULLABLE field will tell you whether things written as undef will be returned as empty strings.

That sort of problem is why I'm suspicious of dbi abstractions. I prefer to have a collection of carefully designed db schema which can be selected and plugged into an application. That kind of close coupling between SQL column attributes and perl data is a pain to maintain if you do it ad hoc. A carefully kept library of common column types and tables is not that much easier to maintain, but there is only one of them.

Is your toolkit using With CGI, what you write as keys %params is returned by the param method without arguments, $q->param.

After Compline,

  • Comment on Re: Writing It Myself, DWIM, and Expectations

Replies are listed 'Best First'.
Re^2: Writing It Myself, DWIM, and Expectations
by dragonchild (Archbishop) on Oct 08, 2004 at 21:52 UTC
    I would love to see you write a meditation on this. DB abstraction layers are of interest to me, especially when I come across something that can help me improve my hand-rolled ones. :-)

    Being right, does not endow the right to be rude; politeness costs nothing.
    Being unknowing, is not the same as being stupid.
    Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
    Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (2)
As of 2021-09-18 04:18 GMT
Find Nodes?
    Voting Booth?

    No recent polls found