Skip to content

Instantly share code, notes, and snippets.

@msouth
Created February 25, 2013 13:00
Show Gist options
  • Save msouth/5029672 to your computer and use it in GitHub Desktop.
Save msouth/5029672 to your computer and use it in GitHub Desktop.
Lines in Dancer cookbook that look unnecessary to me
# bin/script2.pl
#unnecessary use FindBin;
#unnecessary use Cwd qw/realpath/;
use Dancer ':script';
=pod
Dancer already knows this
#tell the Dancer where the app lives
my $appdir=realpath( "$FindBin::Bin/..");
Dancer::Config::setting('appdir',$appdir);
Dancer::Config::load();
=cut
#getter
print "environment:".config->{environment}."\n"; #development
print "log:".config->{log}."\n"; #value from development environment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment