Mercurial > eagle-eye
diff Ikariam.pm @ 48:96ee35378696
modified for searching configuration files
author | "Rex Tsai <chihchun@kalug.linux.org.tw>" |
---|---|
date | Sat, 18 Oct 2008 21:23:09 +0800 |
parents | 5849b6fdc76c |
children | d2ac1e198ce4 |
line wrap: on
line diff
--- a/Ikariam.pm Fri Oct 17 14:06:31 2008 +0800 +++ b/Ikariam.pm Sat Oct 18 21:23:09 2008 +0800 @@ -1,7 +1,8 @@ #!/usr/bin/env perl BEGIN { - my $HOME = (getpwuid($<))[7] || $ENV{HOME} || $ENV{LOGDIR} || "."; - require "$HOME/.eagleeye.pm"; + foreach (((getpwuid($<))[7], $ENV{HOME}, $ENV{LOGDIR}, ".")) { + require "$_/.eagleeye.pm" if (-f "$_/.eagleeye.pm"); + } } use Class::DBI::AutoLoader (