Can someone please help me instead of just pointing me to the manuals?

No such luck :)

There are areas of improvement that I see, one being an effective node title :) How do I compose an effective node title?

You probably had a tough time coming up with one, because your code is not self-contained, and you're asking more than one question , for improving on that :) see How do I post a question effectively?

I imagine, an effective title might be "Creating generic DBIx... model template" or "DBIx... introspection" or ...

The problem is, what if I want to display the results of a different DB? Seems that I should be able to use the same template... maybe I'm just not groking the model.

From your template/description, I can deduce, that resultset is basically this data structure ( an AoH, array of hashrefs)

[ { username => 'username1', password => 'password1', ...}, { username => 'username2', password => 'password2', ...}, ... ],
So to make your template generic, you would use the Template equivalent of keys, which is keys so
<table> [% IF hash = resultset.first %] <tr> [% FOREACH key IN hash.keys.sort %] <th>[% key %]</th> [% END %] </tr> [% END %] [% FOREACH hash IN resultset %] <tr> [% FOREACH key IN hash.keys.sort %] <td>[% hash.$key %]</td> [% END %] </tr> [% END %] </table>

->all probably returns different data structures in different context, see Tutorials: Context in Perl: Context tutorial, about context, and also see the related DBIx documentation :)

For data structure info see perldata and the tuts it references, and same for Template :)

There are other ways to a generic template, but I can't help you with that :)


In reply to Re: Catalyst DBIx Help by Anonymous Monk
in thread Catalyst DBIx Help by PyrexKidd

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.