#!/bin/bash

source ${PERLBREW_ROOT}/etc/bashrc
perlbrew use 5.20
perl -v

set -euo pipefail
IFS=$'\n\t'

PREFIX=~/mylib/daemon

cpanm -n -l $PREFIX URI AnyEvent AnyEvent::FTP::Server Proc::Daemon
perl -I$PREFIX/lib/perl5/ t/bin/ftpd -d
cpanm -n -l $PREFIX  Mojolicious Mojolicious::Plugin::Directory Proc::Daemon
perl -I$PREFIX/lib/perl5/ t/bin/httpd -d

sleep 3
