http://qs321.pair.com?node_id=390498


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 CGI.pm? With CGI, what you write as keys %params is returned by the param method without arguments, $q->param.

After Compline,
Zaxo

  • 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.