lib/DNStools/Config.pm
branchhs12
changeset 87 6d624831079f
parent 85 c47953192c5c
equal deleted inserted replaced
86:dc8741bbad33 87:6d624831079f
    10 
    10 
    11 sub get_config(@) {
    11 sub get_config(@) {
    12 
    12 
    13     # read configuration
    13     # read configuration
    14     my @configs =
    14     my @configs =
    15         @_
    15         @_                          ? @_
    16       ? @_
    16       : defined $ENV{DNSTOOLS_CONF} ? $ENV{DNSTOOLS_CONF}
    17       : (
    17       :   ("dnstools.conf", "$ENV{HOME}/.dnstools.conf", "/etc/dnstools.conf");
    18         $ENV{DNSTOOLS_CONF},         "dnstools.conf",
       
    19         "$ENV{HOME}/.dnstools.conf", "/etc/dnstools.conf"
       
    20       );
       
    21     my %config;
    18     my %config;
    22 
    19 
    23     # the first config FILE
    20     # the first config FILE
    24     my ($_) = grep { -f } @configs;
    21     my ($_) = grep { -f } @configs;
    25 
    22