[Dbix-class] Documentation of DBIx::Class schemas

Brandon Black blblack at gmail.com
Wed Nov 14 16:05:38 GMT 2007


On Nov 7, 2007 11:24 AM, Pedro Melo <melo at simplicidade.org> wrote:
> Hi,
>
> I was wondering how do you document your schemas?
>
> I started adding 'docs' keys to the extra hash for each column. I've
> also added a Doc component that allows me to set up some texts as
> documentation for the class.
>

On a related note, this is a good place to put other metadata.  I like
to put a "label" field in the column_info, and a label (or title, or
something else human-readable and descriptive) in the source_info hash
(that's new in 0.08 IIRC -
http://search.cpan.org/dist/DBIx-Class/lib/DBIx/Class/ResultSource.pm#source_info).
 Then you can write generic form-handling or data-displaying stuff
that uses these fields for labeling the UI.

-- Brandon



More information about the DBIx-Class mailing list