From: Olaf Alders Date: Fri, 19 Dec 2014 17:09:56 +0000 (-0500) Subject: Document how to add perltidy markers via filter_generated_code X-Git-Tag: 0.07043~25 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ba12c8acfa1dd66cbea6c9cfd40a3a33244ab6bd;p=dbsrgits%2FDBIx-Class-Schema-Loader.git Document how to add perltidy markers via filter_generated_code --- diff --git a/Changes b/Changes index 6a4191e..7893b35 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.pm b/lib/DBIx/Class/Schema/Loader.pm index d3ee1ef..55b1398 100644 --- a/lib/DBIx/Class/Schema/Loader.pm +++ b/lib/DBIx/Class/Schema/Loader.pm @@ -679,6 +679,8 @@ Dag-Erling Smørgrav moritz: Moritz Lenz +oalders: Olaf Alders + ... and lots of other folks. If we forgot you, please write the current maintainer or RT. diff --git a/lib/DBIx/Class/Schema/Loader/Base.pm b/lib/DBIx/Class/Schema/Loader/Base.pm index 29c11b1..ab03a98 100644 --- a/lib/DBIx/Class/Schema/Loader/Base.pm +++ b/lib/DBIx/Class/Schema/Loader/Base.pm @@ -1013,6 +1013,17 @@ be generated. return $new_code; } +You can also use this option to set L 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]\n#>>>"; + } + =head1 METHODS None of these methods are intended for direct invocation by regular