Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

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

by renodino (Curate)
on Nov 02, 2005 at 04:18 UTC ( #504816=note: print w/ replies, xml ) Need Help??


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

Iím going crosseyed at all the (select|fetch)(all|row|col)_(array|hash)(ref)? methods in my code ... I have been fighting with an increasingly uncomfortable feeling of programming by coincidence because I can never tell ... what data structure ... my code will return. Itís killing my productivity because Iíve lost my confidence ...

If you're willing to mingle SQL with your perl, and don't mind source filters, perhaps SQL::Preproc would relieve your crosseyed productivity issues ? In most instances, you just write the SQL, inserting whatever Perl variable(s) you need to read from/write to as placeholders. No more "picking the right API call".


Comment on Re: A brief survey of the DBI usability layer modules on the CPAN
Re^2: A brief survey of the DBI usability layer modules on the CPAN
by Aristotle (Chancellor) on Nov 02, 2005 at 04:43 UTC

    Oh dear, source filters. Well, maybe in Perl6, but for now I’m not putting any of those in my production code, sorry. :-)

    Besides that non-specific objection, after a brief perusal of the docs, I have the same complaint as with DBIx::ContextualFetch: the choice of data structures is limited. I really do sometimes want a flattened list with the data from all rows.

    Makeshifts last the longest.

      As I understand it, SQL::PreProc makes quite controlled use of source filters - it specifies what it will and won't parse and mostly (or completely?) doesn't attempt to parse perl so it avoids the dangerous bits of source filters.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (7)
As of 2014-10-02 18:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    What is your favourite meta-syntactic variable name?














    Results (72 votes), past polls