Once upon a time, at my very first job out of college. I had to write a database-oriented Perl script. I ran my script in a dev environment and then handed it over to a sysadmin who then altered the connect string at the top of the program to run it in his production environment.

Much later (about 2-3 years or so), I thought there should have been some better way to do this... to move the variation in program behavior out of code and into configuration.

I had been submitting patches to the author of DBIx::Password so that his module would work with packages such as Alzabo and DBIx::AnyDBD which have a special way of connecting to DBI databases, but he kept rejecting them, on the grounds that his module was designed to keep connection information private and there should be no way of seeing the connection information in cleartext.

So, I created DBIx::Connect, which is based on AppConfig. I am very happy with this module. belg4mit thought it would be a great way to catalog database connections for EZDBI but Dominus insisted that EZDBI would have no external dependencies. I have a co-developer but we have not done much to the module after our initial collaboration, after all, how much variability is there in connecting to databases?

Recently, on the #perlhelp IRC channel I learned of a neat module called autobox, and of course had to check out what other modules such a first-class programmer had made. His Xelig provides clean-cut MVC with calling conventions along the lines of HTML::Seamstress and PeTaL. But most relevant to this post is his XML::Object::DBI which provides DBI connection handles, but also a rather neat way of cataloging SQL, reminiscent of Class::Phrasebook::SQL and also retrieving the SQL without the prepare-execute-fetch ritual.

So anyway, click away to your heart's content... and let me know how you feel database connections should be cataloged... oh! I almost forgot probably the most widely used one: Ima::DBI, which is part of the ever-popular Class::DBI framework. I am working on something similar for DBIx::Recordset via the "living try-as-you-read" documentation in DBIx::Recordset::Playground which is based on DBSchema::Sample.

Carter's compass: I know I'm on the right track when by deleting something, I'm adding functionality.


In reply to DBI database connection support and more by princepawn

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.