* use $^X instead of assuming /usr/bin/perl
[dbsrgits/DBIx-Class-Schema-Loader.git] / lib / DBIx / Class / Schema / Loader / Base.pm
index 35ccc20..f7e1051 100644 (file)
@@ -529,6 +529,11 @@ sub _write_classfile {
         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} || []};
 
@@ -548,12 +553,6 @@ sub _write_classfile {
         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)