I'm strongly considering migrating to DBIx::Class for a database layer in some new applications based on the strong reviews. I've RTFM and I've done some searches, including the archives and haven't found succinct answers to some questions I have. I'm hoping someone with more experience than myself with this set of modules can explain the following to save some time and perhaps benefit future users of these modules:
  1. Arbitrary SQL: Does DBIx::Class allow arbitrary SQL execution OTHER than using scalar references as described here: Arbitrary SQL through a custom ResultSource This method seems overly complex on first glance.

  2. Error Handling: Most code I've ever seen handles errors very poorly. I'm curious if errors are passed back from DBIx::Class methods in such a way that we can differentiate connection errors from SQL or other types of errors to categorize and deal with them. Using other DB layers, one could know the difference, for example, between a connection error or in executing malformed SQL.

  3. Pre-defined joins: I see how ResultSets are defined for single tables and I see how joins can be done at run-time. But I could not find documentation on how to create pre-defined ResultSets for commonly joined tables. I'm certain this must exist, but I'm curious how others have implemented this.

In reply to Migrating to DBIx::Class by DBX

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.