OSDN Git Service

fix config handling
authorISHIKAWA Mutsumi <ishikawa@hanzubon.jp>
Sat, 20 Oct 2012 06:45:02 +0000 (15:45 +0900)
committerISHIKAWA Mutsumi <ishikawa@hanzubon.jp>
Sat, 20 Oct 2012 06:45:02 +0000 (15:45 +0900)
mubot4fb.pl

index 04b2a43..e0a70e6 100755 (executable)
@@ -319,8 +319,8 @@ use Config::Simple;
 my $config_name = $ARGV[0] || 'not_found';
 
 my %cfg;
-my $config_path = ('/etc/mubot4fb/', $ENV{HOME} . '/.mubot4fb/', $ENV{PWD} . '/mubot4fb_');
-foreach my $c ($config_path) {
+my @config_path = ('/etc/mubot4fb/', $ENV{HOME} . '/.mubot4fb/', $ENV{PWD} . '/mubot4fb_');
+foreach my $c (@config_path) {
        my $config = $c . $config_name . '.conf';
        Config::Simple->import_from($config, \%cfg) if (-e $config);
 }