Nephia-Setup-Plugin-Relax

 view release on metacpan or  search on metacpan

lib/Nephia/Setup/Plugin/Relax.pm  view on Meta::CPAN

);
use {{ $self->appname }};

use Plack::Builder;
use Plack::Session::Store::Cache;
use Cache::Memcached::Fast;

my $run_env       = $ENV{PLACK_ENV} eq 'development' ? 'local' : $ENV{PLACK_ENV};
my $basedir       = dirname(__FILE__);
my $config_file   = File::Spec->catfile($basedir, 'config', $run_env.'.pl');
my $config        = require($config_file);
my $cache         = Cache::Memcached::Fast->new($config->{'Cache'});
my $session_store = Plack::Session::Store::Cache->new(cache => $cache);
my $app           = {{ $self->appname }}->run(%$config);

builder {
    enable_if { $ENV{PLACK_ENV} =~ /^($:local|dev)$/ } 'StackTrace', force => 1;
    enable 'Static', (
        root => $basedir,
        path => qr{^/static/},
    );

lib/Nephia/Setup/Plugin/Relax.pm  view on Meta::CPAN

        constants => [qw/Email/],
    },
    ErrorPage => {
        template => 'error.tt',
    },
};

@@ config.pl 
use File::Basename 'dirname';
use File::Spec;
my $common = require(File::Spec->catfile(dirname(__FILE__), 'common.pl'));
my $conf = {
    %$common,
    'Cache' => { 
        servers   => ['127.0.0.1:11211'],
        namespace => '{{ $self->appname }}',
    },
    'DBI' => {
        connect_info => [
            'dbi:SQLite:dbname={{ $self->{dbfile} }}', 
            '', 



( run in 0.371 second using v1.01-cache-2.11-cpan-0d8aa00de5b )