package SQL::Translator;
use strict;
+use warnings;
use vars qw( $VERSION $DEFAULT_SUB $DEBUG $ERROR );
use base 'Class::Base';
=cut
use strict;
+use warnings;
use vars qw/$VERSION/;
$VERSION = '1.59';
=cut
use strict;
+use warnings;
use vars qw/$VERSION/;
$VERSION = '1.59';
=cut
use strict;
+use warnings;
use vars qw/$VERSION/;
$VERSION = '1.59';
package SQL::Translator::Parser;
use strict;
+use warnings;
use vars qw( $VERSION );
$VERSION = '1.60';
=cut
use strict;
+use warnings;
use vars qw[ $DEBUG $VERSION $GRAMMAR @EXPORT_OK ];
$VERSION = '1.59';
$DEBUG = 0 unless defined $DEBUG;
=cut
use strict;
+use warnings;
use DBI;
use vars qw($VERSION @EXPORT);
$VERSION = '1.59';
=cut
use strict;
+use warnings;
use DBI;
use Data::Dumper;
use SQL::Translator::Parser::DB2;
=cut
use strict;
+use warnings;
use DBI;
use Data::Dumper;
use SQL::Translator::Schema::Constants;
=cut
use strict;
+use warnings;
use DBI;
use Data::Dumper;
use SQL::Translator::Schema::Constants;
=cut
use strict;
+use warnings;
use DBI;
use SQL::Translator::Schema;
use Data::Dumper;
=cut
use strict;
+use warnings;
use DBI;
use SQL::Translator::Parser::SQLite;
use Data::Dumper;
=cut
use strict;
+use warnings;
use DBI;
use SQL::Translator::Schema;
use Data::Dumper;
=cut
use strict;
+use warnings;
use vars qw($DEBUG $VERSION @EXPORT_OK);
$DEBUG = 0 unless defined $DEBUG;
$VERSION = '1.59';
=cut
use strict;
+use warnings;
use vars qw[ $DEBUG $VERSION $GRAMMAR @EXPORT_OK ];
$VERSION = '1.59';
$DEBUG = 0 unless defined $DEBUG;
=cut
use strict;
+use warnings;
use vars qw[ $DEBUG $VERSION $GRAMMAR @EXPORT_OK ];
$VERSION = '1.59';
$DEBUG = 0 unless defined $DEBUG;
=cut
use strict;
+use warnings;
use vars qw[ $DEBUG $VERSION $GRAMMAR @EXPORT_OK ];
$VERSION = '1.59';
$DEBUG = 0 unless defined $DEBUG;
=cut
use strict;
+use warnings;
use vars qw[ $DEBUG $VERSION $GRAMMAR @EXPORT_OK ];
$VERSION = '1.59';
=cut
use strict;
+use warnings;
use vars qw[ $DEBUG $VERSION $GRAMMAR @EXPORT_OK ];
$VERSION = '1.59';
$DEBUG = 0 unless defined $DEBUG;
=cut
use strict;
+use warnings;
use vars qw($DEBUG $VERSION @EXPORT_OK);
$DEBUG = 0 unless defined $DEBUG;
$VERSION = '1.59';
=cut
use strict;
+use warnings;
use vars qw[ $DEBUG $VERSION $GRAMMAR @EXPORT_OK ];
$VERSION = '1.59';
=cut
use strict;
+use warnings;
use vars qw[ $VERSION $DEBUG ];
$VERSION = '1.59';
$DEBUG = 1 unless defined $DEBUG;
=cut
use strict;
+use warnings;
use vars qw[ $DEBUG $VERSION @EXPORT_OK ];
$VERSION = '1.59';
package SQL::Translator::Parser::YAML;
use strict;
+use warnings;
use vars qw($VERSION);
$VERSION = '1.59';
=cut
use strict;
+use warnings;
use vars qw($VERSION @EXPORT);
$VERSION = '1.59';
package SQL::Translator::Producer;
use strict;
+use warnings;
use vars qw($VERSION);
use Scalar::Util ();
$VERSION = '1.59';
package SQL::Translator::Producer::ClassDBI;
use strict;
+use warnings;
use vars qw[ $VERSION $DEBUG ];
$VERSION = '1.59';
$DEBUG = 1 unless defined $DEBUG;
use warnings;
use strict;
+use warnings;
use vars qw[ $VERSION $DEBUG $WARN ];
$VERSION = '1.59';
$DEBUG = 0 unless defined $DEBUG;
=cut
use strict;
+use warnings;
use vars qw[ $DEBUG $VERSION @EXPORT_OK ];
$VERSION = '1.59';
=cut
use strict;
+use warnings;
use GD;
use Data::Dumper;
use SQL::Translator::Schema::Constants;
my %skip_field = map { $_, 1 } (
ref $args->{'skip_fields'} eq 'ARRAY'
? @{ $args->{'skip_fields'} }
- : split ( /\s*,\s*/, $args->{'skip_fields'} )
+ : split ( /\s*,\s*/, $args->{'skip_fields'}||'' )
);
my %skip_table = map { $_, 1 } (
ref $args->{'skip_tables'} eq 'ARRAY'
? @{ $args->{'skip_tables'} }
- : split ( /\s*,\s*/, $args->{'skip_tables'} )
+ : split ( /\s*,\s*/, $args->{'skip_tables'}||'' )
);
my @skip_tables_like = map { qr/$_/ } (
ref $args->{'skip_tables_like'} eq 'ARRAY'
? @{ $args->{'skip_tables_like'} }
- : split ( /\s*,\s*/, $args->{'skip_tables_like'} )
+ : split ( /\s*,\s*/, $args->{'skip_tables_like'}||'' )
);
my @table_names;
my $nlen = length $name;
my $dlen = length $desc;
- $max_name = $nlen if $nlen > $max_name;
- $max_desc = $dlen if $dlen > $max_desc;
+ $max_name = $nlen if $nlen > ($max_name||0);
+ $max_desc = $dlen if $dlen > ($max_desc||0);
push @fld_desc, [ $name, $desc, $f->{'name'}, $is_pk, $attr ];
}
];
push @shapes, [ 'rectangle', @bounds, 'black' ];
- $max_x = $this_max_x if $this_max_x > $max_x;
+ $max_x = $this_max_x if $this_max_x > ($max_x||0);
$y += 25;
if ( ++$no_this_col == $no_per_col ) {# if we've filled up this column
$no_this_col = 0; # reset the number of tables
$max_x += $gutter; # push the x over for next column
$this_col_x = $max_x; # remember the max x for this col
- $max_y = $y if $y > $max_y; # note the max y
+ $max_y = $y if $y > ($max_y||0); # note the max y
$y = $orig_y; # reset the y for next column
}
}
my $longest;
for my $len ( map { length $_ } values %legend ) {
- $longest = $len if $len > $longest;
+ $longest = $len if $len > ($longest||0);
}
$longest += 2;
=cut
use strict;
+use warnings;
use Config;
use SQL::Translator;
use File::Temp 'tempfile';
package SQL::Translator::Producer::HTML;
use strict;
+use warnings;
use Data::Dumper;
use vars qw($VERSION $NOWRAP $NOLINKTABLE $NAME);
=cut
use strict;
+use warnings;
use vars qw[ $DEBUG $VERSION @EXPORT_OK ];
$VERSION = '1.59';
=cut
use strict;
+use warnings;
use vars qw[ $VERSION $DEBUG $WARN ];
$VERSION = '1.59';
$DEBUG = 0 unless defined $DEBUG;
=cut
use strict;
+use warnings;
use vars qw[ $VERSION ];
$VERSION = '1.59';
=cut
use strict;
+use warnings;
use vars qw[ $DEBUG $WARN $VERSION ];
$VERSION = '1.59';
$DEBUG = 1 unless defined $DEBUG;
=cut
use strict;
+use warnings;
use vars qw($DEBUG $VERSION @EXPORT_OK);
$DEBUG = 0 unless defined $DEBUG;
$VERSION = '1.59';
=cut
use strict;
+use warnings;
use vars qw[ $DEBUG $WARN $VERSION ];
$VERSION = '1.59';
$DEBUG = 1 unless defined $DEBUG;
=cut
use strict;
+use warnings;
use vars qw[ $VERSION @EXPORT_OK ];
$VERSION = '1.59';
=cut
use strict;
+use warnings;
use vars qw[ $DEBUG $VERSION @EXPORT_OK ];
$VERSION = '1.59';
=cut
use strict;
+use warnings;
use vars qw[ $DEBUG $VERSION @EXPORT_OK ];
$VERSION = '1.59';
=cut
use strict;
+use warnings;
use vars qw[ $VERSION $DEBUG ];
$VERSION = '1.59';
$DEBUG = 1 unless defined $DEBUG;
=cut
use strict;
+use warnings;
use vars qw[ $VERSION @EXPORT_OK ];
$VERSION = '1.59';
=cut
use strict;
+use warnings;
use vars qw($VERSION);
$VERSION = '1.59';
=cut
use strict;
+use warnings;
use SQL::Translator::Schema::Constants;
use SQL::Translator::Schema::Procedure;
use SQL::Translator::Schema::Table;
=cut
use strict;
+use warnings;
use base qw( Exporter );
use vars qw( @EXPORT $VERSION );
require Exporter;
=cut
use strict;
+use warnings;
use SQL::Translator::Schema::Constants;
use SQL::Translator::Utils 'parse_list_arg';
=cut
use strict;
+use warnings;
use SQL::Translator::Schema::Constants;
use SQL::Translator::Utils 'parse_list_arg';
package SQL::Translator::Schema::Graph;
use strict;
+use warnings;
use base 'Class::Base';
package SQL::Translator::Schema::Graph::CompoundEdge;
use strict;
+use warnings;
use base qw(SQL::Translator::Schema::Graph::Edge);
use Class::MakeMethods::Template::Hash (
new => ['new'],
package SQL::Translator::Schema::Graph::Edge;
use strict;
+use warnings;
use Class::MakeMethods::Template::Hash (
new => ['new'],
package SQL::Translator::Schema::Graph::HyperEdge;
use strict;
+use warnings;
use base qw(SQL::Translator::Schema::Graph::Edge);
use Class::MakeMethods::Template::Hash (
package SQL::Translator::Schema::Graph::Node;
use strict;
+use warnings;
use Class::MakeMethods::Template::Hash (
new => [ 'new' ],
package SQL::Translator::Schema::Graph::Port;
use strict;
+use warnings;
1;
=cut
use strict;
+use warnings;
use SQL::Translator::Schema::Constants;
use SQL::Translator::Utils 'parse_list_arg';
=cut
use strict;
+use warnings;
use Class::Base;
use base 'Class::Data::Inheritable';
use base 'Class::Base';
=cut
use strict;
+use warnings;
use SQL::Translator::Utils 'parse_list_arg';
use base 'SQL::Translator::Schema::Object';
=cut
use strict;
+use warnings;
use SQL::Translator::Utils 'parse_list_arg';
use SQL::Translator::Schema::Constants;
use SQL::Translator::Schema::Constraint;
=cut
use strict;
+use warnings;
use SQL::Translator::Utils 'parse_list_arg';
use base 'SQL::Translator::Schema::Object';
=cut
use strict;
+use warnings;
use SQL::Translator::Utils 'parse_list_arg';
use base 'SQL::Translator::Schema::Object';
package SQL::Translator::Utils;
use strict;
+use warnings;
use base qw(Exporter);
use vars qw($VERSION $DEFAULT_COMMENT @EXPORT_OK);
use Digest::SHA1 qw( sha1_hex );