Le lundi 23 février 2015, 07:58:49 jay m a écrit :
>
> your custom command will automatically use your app's config if it's run
> from the app script, e.g.
>
> > ./script/myapp dumpconfig -m production
>
> you probably want to add this to your app startup so you can define
> app-specific custom commands by just dropping them in the Command dir
> push @{$self->commands->namespaces}, 'MyApp::Command';
>
> and then put your custom commands in lib/MyApp/Command, for example
>
> package MyApp::Command::dumpconfig;
> use Mojo::Base 'Mojolicious::Command';
>
> has description => 'dump mode-specific config to stdout';
> # here's what you'll get from -h option
> has usage => "Usage: ./script/mojo dumpconfig [-m <mode>]\n";
>
> sub run {
> my $self=shift;
>
> my $app = $self->app;
> say $app->dumper($app->config);;
> }
> 1;
>
Frak ! It seems that google groups doesn't like my mailer or doesn't like you if you reply to your own mail.
I wrote this yesterday but it didn't reach the mailing list:
? Please, ignore this : it already works! Seems that I did something stupid in the past (I reused the config plugin in a previous app) or that something changed since I wrote the old app.
> By the way : Minion is really great and Mojo::Pg too! The migration tool is soooooo useful! Thanks a lot (and for Mojolicious too, of course :D)
>
Nope, don't ignore that part.
Mojolicious, the framework that anticipate your needs
@Jay : anyway, thx :-)