[Dbix-class] Documentation of DBIx::Class schemas
Pedro Melo
melo at simplicidade.org
Wed Nov 14 12:05:19 GMT 2007
Hi,
On Nov 13, 2007, at 10:17 PM, Jason Kohles wrote:
> On Nov 7, 2007, at 12:24 PM, Pedro Melo 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.
>>
>> Then I can use basic introspection and generate the entire
>> documentation (right now using a Catalyst::Controller).
>>
>> To prevent unnecessary memory usage in production, all the text of
>> the docs is not kept unless a environment variable is set.
>>
> I'm actually doing the same thing, I've been working on a
> DBIx::Class::AutoDoc package which includes a tool that takes a
> DBIx::Class::Schema object and generates documentation for it,
> similar to the documentation that is produced by postgresql_autodoc
> (http://www.rbt.ca/autodoc/) but from the standpoint of documenting
> the classes, rather than the database itself. I'm planning on an
> initial release sometime this week, as soon as I can get a few last
> issues worked out.
This is my attempt at it. It works ok for me right now, no docs yet.
http://scsys.co.uk:8001/10756
To use, create a Cat controller and use base it like this:
http://scsys.co.uk:8001/10757
start at /docs/db and follow the links. I added the notion of table
groups, it helps me sort tables into functional areas.
A sample schema result class with documentation, PT, sorry :):
http://scsys.co.uk:8001/10758
Best regards,
--
Pedro Melo
Blog: http://www.simplicidade.org/notes/
XMPP ID: melo at simplicidade.org
Use XMPP!
More information about the DBIx-Class
mailing list