NAME

Mojolicious::Plugin::ModeSwitcher - Configuration change by MOJO_MODE

ARGUMENTS

file

Autoload config from yml/json file

dump

Preload configuration from yml/json

reload

Reload configuration

include

If your configuration has a file.(yml|json), ModeSwitcher replace the value of the contents of the file

SPECIAL NAMES

If your configuration has static_path or templates_path, ModeSwitcher will make the:

    push @{ $app->renderer->paths }, $conf->{templates_path}
    push @{ $app->static->paths },   $conf->{static_path}

SYNOPSIS

$self->plugin( 'ModeSwitcher' );
...
$self->switch_config( file => 'etc/conf.yml' );
...
print self->stash( 'switch_config' )->{db_name};

AUTHOR

Grishkovelli grishkovelli@gmail.com

Git

https://github.com/grishkovelli/Mojolicious-Plugin-ModeSwitcher

COPYRIGHT

Copyright (C) 2013, Grishkovelli.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.