Thanks for this.

First time I tried it, i pointed it to a SQLite file, which of course
doesn't have any relationship info in it.

To fix that, I've attached a patch to make it support a --schema
argument, so that you can also point it to your DBIx::Class subclass
to get the rels.

It also makes the username/password optional, as they're unnecessary for SQLite.

It would be very nice if there were an easy way to order the output
better. I don't like simply having everything listed alphabetically. I
know that I'd want to rearrange things, which would make diffs
difficult, were I to regenerate the config again after any schema
changes.

Cheers,
Carl
15d14
< my $schema;
24d22
<     'schema=s' => \$schema,
29,35d26
< if ($schema) {
<     eval "use $schema";
< }
< else {
<     $schema = 'My::Schema';
< }
< 
47,53c38,39
< my @connect = ($dsn);
< push @connect, $duser     if defined $duser;
< push @connect, $dpassword if defined $dpassword;
< 
< my $instance = $schema->connect(@connect);
< my $generator = HTML::FormFu::ConfigGenerator->new( schema => $instance );
< 
---
> my $schema = My::Schema->connect($dsn, $duser, $dpassword);
> my $generator = HTML::FormFu::ConfigGenerator->new( schema => $schema );
_______________________________________________
HTML-FormFu mailing list
[email protected]
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu

Reply via email to