[Bast-commits] r5817 -
branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader
timbunce at dev.catalyst.perl.org
timbunce at dev.catalyst.perl.org
Thu Mar 26 12:46:17 GMT 2009
Author: timbunce
Date: 2009-03-26 12:46:16 +0000 (Thu, 26 Mar 2009)
New Revision: 5817
Modified:
branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/Base.pm
Log:
Move _get_custom_content call close to where it's used.
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 2009-03-26 09:13:18 UTC (rev 5816)
+++ branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/Base.pm 2009-03-26 12:46:16 UTC (rev 5817)
@@ -531,12 +531,6 @@
unlink($filename);
}
- my $custom_content = $self->_get_custom_content($class, $filename);
-
- $custom_content ||= qq|\n\n# You can replace this text with custom|
- . qq| content, and it will be preserved on regeneration|
- . qq|\n1;\n|;
-
$text .= qq|$_\n|
for @{$self->{_dump_storage}->{$class} || []};
@@ -555,6 +549,13 @@
print $fh qq|$_\n|
for @{$self->{_ext_storage}->{$class} || []};
+ # Write out any custom content the user has added
+ my $custom_content = $self->_get_custom_content($class, $filename);
+
+ $custom_content ||= qq|\n\n# You can replace this text with custom|
+ . qq| content, and it will be preserved on regeneration|
+ . qq|\n1;\n|;
+
print $fh $custom_content;
close($fh)
More information about the Bast-commits
mailing list