Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

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 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
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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2014-09-22 00:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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











    Results (176 votes), past polls