[642] in BarnOwl Developers

home help back first fref pref prev next nref lref last post

[D-O-H] r742 - trunk/owl/perl/lib/BarnOwl

daemon@ATHENA.MIT.EDU (nelhage@MIT.EDU)
Thu Oct 29 18:08:14 2009

Resent-From: nelhage@mit.edu
Resent-To: barnowl-dev-mtg@charon.mit.edu
To: dirty-owl-hackers@mit.edu
From: nelhage@MIT.EDU
Reply-to: dirty-owl-hackers@MIT.EDU
Date: Sun,  8 Jul 2007 15:39:58 -0400 (EDT)

Author: nelhage
Date: 2007-07-08 15:39:57 -0400 (Sun, 08 Jul 2007)
New Revision: 742

Modified:
   trunk/owl/perl/lib/BarnOwl/ModuleLoader.pm
Log:
I don't understand why this didn't commit last time. I blame psvn.


Modified: trunk/owl/perl/lib/BarnOwl/ModuleLoader.pm
===================================================================
--- trunk/owl/perl/lib/BarnOwl/ModuleLoader.pm	2007-07-08 19:37:43 UTC (rev 741)
+++ trunk/owl/perl/lib/BarnOwl/ModuleLoader.pm	2007-07-08 19:39:57 UTC (rev 742)
@@ -5,14 +5,17 @@
 
 use lib (BarnOwl::get_data_dir() . "/modules/");
 use PAR (BarnOwl::get_data_dir() . "/modules/*.par");
-use PAR ($ENV{HOME} . "/.owl/modules/*.par");
+use PAR (BarnOwl::get_config_dir() . "/modules/*.par");
 
 sub load_all {
     my %modules;
     my @modules;
+
+    my @moddirs = ();
+    push @moddirs, BarnOwl::get_data_dir() . "/modules";
+    push @moddirs, BarnOwl::get_config_dir() . "/modules";
     
-    for my $dir ( BarnOwl::get_data_dir() . "/modules",
-                  $ENV{HOME} . "/.owl/modules" ) {
+    for my $dir (@moddirs) {
         opendir(my $dh, $dir) or next;
         while(defined(my $f = readdir($dh))) {
             next if $f =~ /^\./;


home help back first fref pref prev next nref lref last post