Changeset 8135737 for perl/lib


Ignore:
Timestamp:
Jan 23, 2012, 5:12:56 PM (13 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
master, release-1.10, release-1.9
Children:
9a2dd0c, ab88b05, 533b3a4
Parents:
678f607
git-author:
Kevin Riggle <kevinr@free-dissociation.com> (12/26/11 17:35:51)
git-committer:
David Benjamin <davidben@mit.edu> (01/23/12 17:12:56)
Message:
rename default config file to .owl/init.pl

motivations: to make clear that the config file is a perl script, which
runs before and is neither shadowed nor superceded by .owl/startup.

fix doc wording per andersk

more doc fixes from andersk

clean up the else-case logic, per andersk
File:
1 edited

Legend:

Unmodified
Added
Removed
  • perl/lib/BarnOwl.pm

    r7803326 r8135737  
    329329our @all_commands;
    330330
    331 if(!$configfile && -f $ENV{HOME} . "/.barnowlconf") {
    332     $configfile = $ENV{HOME} . "/.barnowlconf";
    333 }
    334 $configfile ||= $ENV{HOME}."/.owlconf";
     331if(!$configfile) {
     332    if (-f get_config_dir() . "/init.pl") {
     333        $configfile = get_config_dir() . "/init.pl";
     334    } elsif (-f $ENV{HOME} . "/.barnowlconf") {
     335        $configfile = $ENV{HOME} . "/.barnowlconf";
     336    } else {
     337        $configfile = $ENV{HOME}."/.owlconf";
     338    }
     339}
    335340
    336341# populate global variable space for legacy owlconf files
Note: See TracChangeset for help on using the changeset viewer.