Skip Menu |

This queue is for tickets about the DBIx-Class-Schema-Loader CPAN distribution.

Report information
The Basics
Id: 53841
Status: resolved
Priority: 0/
Queue: DBIx-Class-Schema-Loader

People
Owner: Nobody in particular
Requestors: RASSIE [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: Preprocessor for generated code needed
See http://stackoverflow.com/questions/2102211/how-can-i-tidy- dbixclassschemaloaders-output for initial question. Basically, generated code should use existing coding conventions. Since D::C::S::L uses hashes to check for changes in generated code, it would be nice to have a preprocessor parameter, which would be a subref (or something like it) which would be applied to the code before it's written to the file.
On Wed Jan 20 10:11:28 2010, RASSIE wrote: Show quoted text
> See http://stackoverflow.com/questions/2102211/how-can-i-tidy- > dbixclassschemaloaders-output for initial question.
Can we *vote* on tickets? :) I looked into the schema loader code for this and I see that there's no clean hook for this. Unfortunately, my vim setup makes it painfully easy for me to type <tt>,pt</tt> and automatically tidy an entire file. If I'm not careful, I then get a large commit which is basically useless. I might just modify that to not let it tidy a schema file, but it would be lovely if I could. Just being able to pass in the name of my .perltidyrc file would be great. Cheers, Ovid
http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=dbsrgits/DBIx-Class-Schema- Loader.git;a=commit;h=9d10af1a387e2def9de71236d4e374def43b9b42 adds this feature. I am currently waiting for review.
On Wed Aug 03 19:35:02 2011, TILLY wrote: Show quoted text
> http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=dbsrgits/DBIx-Class- > Schema- > Loader.git;a=commit;h=9d10af1a387e2def9de71236d4e374def43b9b42 adds > this feature. I > am currently waiting for review.
Merged to master as filter_generated_code .
Added 'filter_generated_code' option in 0.07011, it can take an executable or a code ref.