Changeset 5f8d8a1
- Timestamp:
- Sep 15, 2008, 9:04:49 PM (16 years ago)
- Branches:
- master, debian, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- c194705
- Parents:
- d8c456c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
perl/lib/BarnOwl/ModuleLoader.pm
ra82e091 r5f8d8a1 13 13 my $class = shift; 14 14 $class->rescan_modules; 15 PAR::reload_libs(); 15 16 16 17 for my $mod (keys %modules) { … … 24 25 25 26 sub rescan_modules { 26 PAR::reload_libs();27 27 PAR->import(BarnOwl::get_data_dir() . "/modules/*.par"); 28 28 PAR->import(BarnOwl::get_config_dir() . "/modules/*.par"); … … 65 65 } 66 66 67 my $parfile; 68 for my $p (@PAR::PAR_INC) { 69 if($p =~ m/\Q$module\E[.]par$/) { 70 $parfile = $p; 71 last; 72 } 73 } 74 67 75 local $SIG{__WARN__} = \&squelch_redefine; 68 if(!defined eval "use BarnOwl::Module::$module") { 76 77 if(defined $parfile) { 78 PAR::reload_libs($parfile); 79 } elsif(!defined eval "use BarnOwl::Module::$module") { 69 80 BarnOwl::error("Unable to load module $module: \n$@\n") if $@; 70 81 }
Note: See TracChangeset
for help on using the changeset viewer.