* Add support for monotonically increasing SQLite autoincs (GH#47)
* Declare dependencies in deterministic order (RT#102859)
+ * Multiple speedups of naive internal debugging mechanism
* Remove dependency on List::MoreUtils ( http://is.gd/lmu_cac_debacle )
0.11021 2015-01-29
next;
}
else {
- __PACKAGE__->debug("Adding $filt filter. Args:".Dumper(\@args)."\n");
+ __PACKAGE__->debug("Adding $filt filter. Args:".Dumper(\@args)."\n") if __PACKAGE__->debugging;
$filt = _load_sub("$filt\::filter", "SQL::Translator::Filter")
|| throw(__PACKAGE__->error);
push @filters, [$filt,@args];
return $self->error($msg);
}
}
- $self->debug("Schema =\n", Dumper($self->schema), "\n");
+ $self->debug("Schema =\n", Dumper($self->schema), "\n") if $self->debugging;;
# Validate the schema if asked to.
if ($self->validate) {
my $schema = $t->schema;
my $args = $t->producer_args;
local $DEBUG = $t->debug;
- debug("Schema =\n", Dumper( $schema ));
- debug("Producer args =\n", Dumper( $args ));
+ debug("Schema =\n", Dumper( $schema )) if $DEBUG;
+ debug("Producer args =\n", Dumper( $args )) if $DEBUG;
my $out_file = $args->{'out_file'} || '';
my $output_type = $args->{'output_type'} || 'png';
debug("Processing table '$table_name'");
my @fields = $table->get_fields;
- debug("Fields = ", join(', ', map { $_->name } @fields));
+ debug("Fields = ", join(', ', map { $_->name } @fields)) if $DEBUG;
my ( @fld_desc, $max_name, $max_desc );
for my $f ( @fields ) {
debug("Processing table '$table_name'");
- debug("Fields = ", join(', ', map { $_->name } @fields));
+ debug("Fields = ", join(', ', map { $_->name } @fields)) if $DEBUG;
for my $f ( @fields ) {
my $name = $f->name or next;
my %tt_conf = exists $args->{tt_conf} ? %{$args->{tt_conf}} : ();
# sqlt passes the producer args for _all_ producers in, so we use this
# grep hack to test for the old usage.
- debug(Dumper(\%tt_conf));
+ debug(Dumper(\%tt_conf)) if $DEBUG;
if ( grep /^[A-Z_]+$/, keys %$args ) {
warn "Template config directly in the producer args is deprecated."
." Please use 'tt_conf' instead.\n";