[dancer-users] Flexible credentials with Dancer::Plugin::Database

Lutz Gehlen lrg_ml at gmx.net
Sat May 3 20:50:06 BST 2014

Hello all,
I would like to use Dancer::Plugin::Database to access a postgresql 
database from my dancer application. The docu suggests to configure the 
connection like this:

        driver: 'mysql'
        database: 'test'
        host: 'localhost'
        port: 3306
        username: 'myusername'
        password: 'mypassword'
        connection_check_threshold: 10
            RaiseError: 1
            AutoCommit: 1
        on_connect_do: ["SET NAMES 'utf8'", "SET CHARACTER SET 'utf8'" ]
        log_queries: 1
        handle_class: 'My::Super::Sexy::Database::Handle'

However, I would like to store the login details, namely username and 
password, in a different file that I can exclude from version control by 
gitignore for security reasons as well as to enable my co-developers to use 
different credentials on their system. Is there a good way to achieve this?

Thanks for your help,

More information about the dancer-users mailing list