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 :-)
-- 
Luc
http://www.fiat-tux.fr/
Internet n'est pas compliqué, Internet est ce que vous en faites.

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.

Reply via email to