X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FSQL%2FTranslator%2FProducer%2FPOD.pm;h=17c378a79dab9381c399c8289414f40eb6074fc4;hb=c0ec0e22d3f0e3852c00daac5ef5763010b410c3;hp=abced9833b079eb0fac828b7712cf4079ca6615b;hpb=0c04c5a2210135419771878dc7e341a1cba52cca;p=dbsrgits%2FSQL-Translator.git diff --git a/lib/SQL/Translator/Producer/POD.pm b/lib/SQL/Translator/Producer/POD.pm index abced98..17c378a 100644 --- a/lib/SQL/Translator/Producer/POD.pm +++ b/lib/SQL/Translator/Producer/POD.pm @@ -83,23 +83,27 @@ sub produce { $pod .= "=head3 CONSTRAINTS\n\n"; for my $c ( @constraints ) { $pod .= "=head4 " . $c->type . "\n\n=over 4\n\n"; - $pod .= "=item * Fields = " . - join(', ', $c->fields ) . "\n\n"; - - if ( $c->type eq FOREIGN_KEY ) { - $pod .= "=item * Reference Table = Lreference_table . ">\n\n"; - $pod .= "=item * Reference Fields = " . - join(', ', map {"L"} $c->reference_fields ) . - "\n\n"; - } - - if ( my $update = $c->on_update ) { - $pod .= "=item * On update = $update\n\n"; - } - - if ( my $delete = $c->on_delete ) { - $pod .= "=item * On delete = $delete\n\n"; + if($c->type eq CHECK_C) { + $pod .= "=item * Expression = " . $c->expression . "\n\n"; + } else { + $pod .= "=item * Fields = " . + join(', ', $c->fields ) . "\n\n"; + + if ( $c->type eq FOREIGN_KEY ) { + $pod .= "=item * Reference Table = Lreference_table . ">\n\n"; + $pod .= "=item * Reference Fields = " . + join(', ', map {"L"} $c->reference_fields ) . + "\n\n"; + } + + if ( my $update = $c->on_update ) { + $pod .= "=item * On update = $update\n\n"; + } + + if ( my $delete = $c->on_delete ) { + $pod .= "=item * On delete = $delete\n\n"; + } } $pod .= "=back\n\n";