diff --git a/Changes b/Changes index 6a4191e0c..7893b357d 100644 --- a/Changes +++ b/Changes @@ -1,6 +1,7 @@ Revision history for Perl extension DBIx::Class::Schema::Loader - Fix many_to_many bridges with overlapping foreign keys + - Document how to add perltidy markers via filter_generated_code 0.07042 2014-08-20 - Fix unescaped left braces in regexes in tests diff --git a/lib/DBIx/Class/Schema/Loader/Base.pm b/lib/DBIx/Class/Schema/Loader/Base.pm index 0b22a09fc..58faf9f4e 100644 --- a/lib/DBIx/Class/Schema/Loader/Base.pm +++ b/lib/DBIx/Class/Schema/Loader/Base.pm @@ -1013,6 +1013,16 @@ be generated. return $new_code; } +You can also use this option to set C markers in your generated +classes. This will leave the generated code in the default format, but will +allow you to tidy your classes at any point in future, without worrying about +changing the portions of the file which are checksummed, since C will +just ignore all text between the markers. + + filter_generated_code => sub { + return "#<<<\n$_[2]#>>>"; + } + =head1 METHODS None of these methods are intended for direct invocation by regular