RapidApp::Util::RapidDbic::CfgWriter - Updates RapidDbic model configs using PPI
use RapidApp::Util::RapidDbic::CfgWriter; my $CfgW = RapidApp::Util::RapidDbic::CfgWriter->new({ pm_file => "$pm_path" }); $CfgW->save_to( "$pm_path" );
This module non-destructively updates the TableSpecs configs of RapidDbic-based model classes based on the current state of the associated DBIx:Class schema set in the schema_class config. The purpose is to add the base boilerplate configs for the schema if it has been changed since the application was originally bootstrapped. It is designed to NOT clobber user-supplied configs by only adding the defaults of missing options, leaving the rest alone.
TableSpecs
schema_class
Create a new RapidApp::Util::RapidDbic::CfgWriter instance. The following build options are supported:
Path to the Model pm file. Required.
When true (default) the file is post-processed by Perl::Tidy.
The options supplied to perltidy - defaults to '-i=2 -l=100 -nbbc'
perltidy
'-i=2 -l=100 -nbbc'
Writes out the updated file contents to the supplied path.
RapidApp
Henry Van Styn <vanstyn@cpan.org>
This software is copyright (c) 2016 by IntelliTree Solutions llc.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install RapidApp, copy and paste the appropriate command in to your terminal.
cpanm
cpanm RapidApp
CPAN shell
perl -MCPAN -e shell install RapidApp
For more information on module installation, please visit the detailed CPAN module installation guide.