From: Ash Berlin Date: Mon, 5 Oct 2009 13:38:45 +0000 (+0000) Subject: Place a warning at the top of the files too X-Git-Tag: 0.04999_09~1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b4dcbcc573df920180bdda4b8f3f226a8a8282f9;p=dbsrgits%2FDBIx-Class-Schema-Loader.git Place a warning at the top of the files too --- diff --git a/Changes b/Changes index af47a0d..c63bd80 100644 --- a/Changes +++ b/Changes @@ -1,6 +1,8 @@ Revision history for Perl extension DBIx::Class::Schema::Loader - Only redump the files when something has actually changed + - Place a warning at the top of the files saying 'do not modify' to + match the one at the bottom of the auto-gen'd section 0.04999_08 2009-08-28 - Replace UNIVERSAL::require with Class::C3::Componentised diff --git a/lib/DBIx/Class/Schema/Loader/Base.pm b/lib/DBIx/Class/Schema/Loader/Base.pm index fab01f5..c35af96 100644 --- a/lib/DBIx/Class/Schema/Loader/Base.pm +++ b/lib/DBIx/Class/Schema/Loader/Base.pm @@ -498,6 +498,8 @@ sub _dump_to_dir { my $schema_text = qq|package $schema_class;\n\n| + . qq|# Created by DBIx::Class::Schema::Loader\n| + . qq|# DO NOT MODIFY THE FIRST PART OF THIS FILE\n\n| . qq|use strict;\nuse warnings;\n\n| . qq|use base '$schema_base_class';\n\n|; @@ -525,6 +527,8 @@ sub _dump_to_dir { foreach my $src_class (@classes) { my $src_text = qq|package $src_class;\n\n| + . qq|# Created by DBIx::Class::Schema::Loader\n| + . qq|# DO NOT MODIFY THE FIRST PART OF THIS FILE\n\n| . qq|use strict;\nuse warnings;\n\n| . qq|use base '$result_base_class';\n\n|;