[Bast-commits] r3157 -
branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader
blblack at dev.catalyst.perl.org
blblack at dev.catalyst.perl.org
Fri Mar 30 06:25:15 GMT 2007
Author: blblack
Date: 2007-03-30 06:25:14 +0100 (Fri, 30 Mar 2007)
New Revision: 3157
Modified:
branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/Base.pm
Log:
dtrt when previous dumpfile was not generated by us
Modified: branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/Base.pm
===================================================================
--- branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/Base.pm 2007-03-30 01:11:31 UTC (rev 3156)
+++ branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/Base.pm 2007-03-30 05:25:14 UTC (rev 3157)
@@ -368,9 +368,7 @@
unlink($filename);
}
- my $custom_content = (-f $filename)
- ? $self->_get_custom_content($filename)
- : undef;
+ my $custom_content = $self->_get_custom_content($filename);
$custom_content ||= qq|\n# You can replace this text with custom|
. qq| content, and it will be preserved on regeneration|
@@ -427,8 +425,10 @@
}
}
- if(!$found) {
- }
+ croak "Cannot not overwrite '$filename' without 'dump_overwrite',"
+ " it does not appear to have been generated by Loader";
+ if !$found;
+
return $buffer;
}
More information about the Bast-commits
mailing list