KelpX::AppBuilder

32 views
Skip to first unread message

Brad

unread,
Aug 20, 2014, 9:41:13 AM8/20/14
to perl...@googlegroups.com
Figured it would make more sense to open a new topic for changes to KelpX::AppBuilder, the module that helps you create reusable applications with Kelp. I've successfully created a home banking solution with it, and pretty happy thus far!
You can pick the code up here: https://github.com/bradhaywood/KelpX-AppBuilder

* I've just added the ability to reuse configs now, by moving them into a module (ie: BaseApp::Config).

package BaseApp::Config;
use KelpX::AppBuilder BaseConfig => 'BaseApp';

sub config {
    {
        ....
    }
}


BaseConfig => 'NameOfYourBaseApp', will export the base_path() method you can use to retrieve the lib/auto directory automatically.
Then, in your extended app

conf/config.pl

use KelpX::AppBuilder Config => 'BaseApp';
return base_config(); # returns the hash in your config method found in BaseApp::Config

That's all there is to reusing your config!

Before this change gets released to CPAN I will be performing some more tests, and also make it a bit smarter so you don't have to declare the base module name to BaseConfig.

Brad

unread,
Aug 20, 2014, 11:02:40 AM8/20/14
to perl...@googlegroups.com
Just added a groovy new tool in bin/kelpx-appbuilder

It uses "Kelp" to first create your boilerplate stuff, then changes the files required. Currently it can just create an extended app (not base app yet), but works pretty well. Sample usage below:

$ kelpx-appbuilder app NewApp extends BaseApp

I will work on auto-creation of a base app and update shortly :)
Reply all
Reply to author
Forward
0 new messages