projects
/
licom.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
89c58aa
)
LiCoM::Config: Read the file `licom.conf' in the script's directory too, if it exists.
author
Florian Forster
<octo@verplant.org>
Mon, 11 Sep 2006 21:16:40 +0000
(23:16 +0200)
committer
Florian Forster
<octo@verplant.org>
Mon, 11 Sep 2006 21:16:40 +0000
(23:16 +0200)
lib/LiCoM/Config.pm
patch
|
blob
|
history
diff --git
a/lib/LiCoM/Config.pm
b/lib/LiCoM/Config.pm
index
295f7eb
..
be8359f
100644
(file)
--- a/
lib/LiCoM/Config.pm
+++ b/
lib/LiCoM/Config.pm
@@
-4,6
+4,8
@@
use strict;
use warnings;
use Carp (qw(cluck confess));
+use File::Basename (qw(dirname));
+
use Exporter;
@LiCoM::Config::EXPORT_OK = (qw(get_config set_config read_config));
@@
-72,6
+74,10
@@
sub read_config
{
push (@files, $ENV{'HOME'} . '/.licomrc');
}
+ elsif (defined ($ENV{'SCRIPT_FILENAME'}))
+ {
+ push (@files, dirname ($ENV{'SCRIPT_FILENAME'}) . '/licom.conf');
+ }
for (@files)
{