1
0
mirror of https://gitlab.com/depesz/explain.depesz.com.git synced 2025-11-29 23:08:18 +02:00

Editorialization of last merge

- change the secret/secrets code so that it will work in both old and new
  Mojolicious versions.
- Add information that perl modules can be installed from distribution
  package repositories, and not neccessarily from cpan
- Add more description to information on config file
- Revert default config to previous state
- Add tests (to be run by explain.pl test) that check for required perl
  modules
This commit is contained in:
Hubert depesz Lubaczewski
2014-10-31 15:55:59 +01:00
parent 916d0d9581
commit 930f22b1c6
5 changed files with 61 additions and 40 deletions

View File

@@ -20,7 +20,14 @@ sub startup {
# setup secret passphrase - later versions of
# mojolicious require secrets to be multiple in an
# array format
$self->secrets( [$config->{ secret } || 'test'] );
my $use_secret = $config->{ secret } || 'Xwyfe-_d:yGDr+p][Vs7Kk+e3mmP=c_|s7hvExF=b|4r4^gO|';
if ( $self->can( 'secrets' ) ) {
# We're on Mojolicious 4.63 or newer
$self->secrets( [ $use_secret ] );
} else {
# We're on old Mojolicious
$self->secret( $use_secret );
}
# startup database connection
$self->plugin( 'database', $config->{ database } || {} );