Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: What's the best module to stop mixing SQL with Perl?

by jZed (Prior)
on Sep 08, 2006 at 20:15 UTC ( [id://572082]=note: print w/replies, xml ) Need Help??


in reply to What's the best module to stop mixing SQL with Perl?

One of the differences between the various modules is how they store the SQL. SQL::Catalog stores the SQL in an RDBMS; DBIx:POS stores it in Plain Old SQL, a POD-like format; Class::Phrasebook::SQL stores it in XML.

Personally I have a preference for storing the SQL in plain text files for easy editing. I use SQL comments to name the snippets and read the names and snippets into a hash with a simple parse on /;\n\n+/. One advantage of doing it that way is that the files are nothing but pure SQL and so can be run through dbish or other SQL-file processors specific to various RDBMSs and can be easily read by DBAs with no knowledge of how the SQL is used in an application or even what language the app is written in.

  • Comment on Re: What's the best module to stop mixing SQL with Perl?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2024-04-23 06:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found