Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
exit the program if the config file wasn't found
also writes the cwd to the console.
  • Loading branch information
timo committed Feb 28, 2015
1 parent 620d8ef commit 067570b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions evalbot.pl
Expand Up @@ -36,6 +36,7 @@ =head1 AUTHOR
use Carp qw(confess);
use Data::Dumper;
use FindBin;
use Cwd;
use lib 'lib';
use EvalbotExecuter;
use IRC::FromANSI::Tiny;
Expand Down Expand Up @@ -358,6 +359,10 @@ package main;
exit 0;
}

unless (-e $config_file) {
confess("The given config file, $config_file, wasn't found in {getcwd}.");
}

my %conf = %{ Config::File::read_config_file($config_file) };

#warn Dumper(\%conf);
Expand Down

0 comments on commit 067570b

Please sign in to comment.