Skip to content

Instantly share code, notes, and snippets.

@msouth
Created August 5, 2013 19:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save msouth/6158618 to your computer and use it in GitHub Desktop.
Save msouth/6158618 to your computer and use it in GitHub Desktop.
# This is the main configuration file of your Dancer app
# env-related settings should go to environments/$env.yml
# all the settings in this file will be loaded at Dancer's startup.
# Your application's name
appname: "Acme::Test::Dancer::Plugin::Database"
# The default layout to use for your application (located in
# views/layouts/main.tt)
layout: "main"
# when the charset is set to UTF-8 Dancer will handle for you
# all the magic of encoding and decoding. You should not care
# about unicode within your app when this setting is set (recommended).
charset: "UTF-8"
# template engine
# simple: default and very basic template engine
# template_toolkit: TT
template: "simple"
# template: "template_toolkit"
# engines:
# template_toolkit:
# encoding: 'utf8'
# start_tag: '[%'
# end_tag: '%]'
plugins:
Database:
connections:
foo:
driver: SQLite
dbname: 'test.sdb'
package Acme::Test::Dancer::Plugin::Database;
use Dancer ':syntax';
use Dancer::Plugin::Database;
our $VERSION = '0.1';
get '/' => sub {
template 'index';
my $conn = database('foo');
my $also_conn = database('foo');
};
true;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment