X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FSQL%2FTranslator%2FProducer%2FPOD.pm;h=b7aa028576a2fc223192e910e7b35bd790eba2e3;hb=f27f9229eaf8c5ce637bea1f99eb8f9bdb42799c;hp=04bd685cd504caaafae5e8e92582d5c0e62e9b67;hpb=977651a56d55fa4b2aacb19977667abd7f241c9a;p=dbsrgits%2FSQL-Translator.git diff --git a/lib/SQL/Translator/Producer/POD.pm b/lib/SQL/Translator/Producer/POD.pm index 04bd685..b7aa028 100644 --- a/lib/SQL/Translator/Producer/POD.pm +++ b/lib/SQL/Translator/Producer/POD.pm @@ -1,25 +1,5 @@ package SQL::Translator::Producer::POD; -# ------------------------------------------------------------------- -# $Id: POD.pm,v 1.5 2004-02-09 23:02:15 kycl4rk Exp $ -# ------------------------------------------------------------------- -# Copyright (C) 2002-4 SQLFairy Authors -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; version 2. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -# 02111-1307 USA -# ------------------------------------------------------------------- - =head1 NAME SQL::Translator::Producer::POD - POD producer for SQL::Translator @@ -33,21 +13,21 @@ SQL::Translator::Producer::POD - POD producer for SQL::Translator =head1 DESCRIPTION -Creates a POD description of each table, field, index, and constraint. -A good starting point for text documentation of a schema. You can -easily convert the output to HTML or text using "perldoc" or other +Creates a POD description of each table, field, index, and constraint. +A good starting point for text documentation of a schema. You can +easily convert the output to HTML or text using "perldoc" or other interesting formats using Pod::POM or Template::Toolkit's POD plugin. =cut use strict; +use warnings; use vars qw[ $VERSION ]; -$VERSION = sprintf "%d.%02d", q$Revision: 1.5 $ =~ /(\d+)\.(\d+)/; +$VERSION = '1.59'; use SQL::Translator::Schema::Constants; use SQL::Translator::Utils qw(header_comment); -# ------------------------------------------------------------------- sub produce { my $t = shift; my $schema = $t->schema; @@ -91,7 +71,7 @@ sub produce { $pod .= "=head3 INDICES\n\n"; for my $index ( @indices ) { $pod .= "=head4 " . $index->type . "\n\n=over 4\n\n"; - $pod .= "=item * Fields = " . + $pod .= "=item * Fields = " . join(', ', $index->fields ) . "\n\n"; $pod .= "=back\n\n"; } @@ -104,23 +84,23 @@ sub produce { $pod .= "=head3 CONSTRAINTS\n\n"; for my $c ( @constraints ) { $pod .= "=head4 " . $c->type . "\n\n=over 4\n\n"; - $pod .= "=item * Fields = " . + $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 ) . + $pod .= "=item * Reference Fields = " . + join(', ', map {"L"} $c->reference_fields ) . "\n\n"; } if ( my $update = $c->on_update ) { - $pod .= "=item * On update = $update"; + $pod .= "=item * On update = $update\n\n"; } if ( my $delete = $c->on_delete ) { - $pod .= "=item * On delete = $delete"; + $pod .= "=item * On delete = $delete\n\n"; } $pod .= "=back\n\n"; @@ -146,7 +126,11 @@ sub produce { =head1 AUTHOR -Ken Y. Clark Ekclark@cpan.orgE. +Ken Youens-Clark Ekclark@cpan.orgE. + +=head2 CONTRIBUTORS + +Jonathan Yu Efrequency@cpan.orgE =head1 SEE ALSO