[1193] in BarnOwl Developers
[D-O-H] r1132 - trunk/owl/perl/lib/BarnOwl
daemon@ATHENA.MIT.EDU (asedeno@MIT.EDU)
Thu Oct 29 18:13:57 2009
Resent-From: nelhage@mit.edu
Resent-To: barnowl-dev-mtg@charon.mit.edu
X-Original-To: nelhage@nelhage.com
To: dirty-owl-hackers@MIT.EDU
From: asedeno@MIT.EDU
Reply-To: dirty-owl-hackers@MIT.EDU
Date: Mon, 29 Sep 2008 19:24:37 -0400 (EDT)
Author: asedeno
Date: 2008-09-29 19:24:37 -0400 (Mon, 29 Sep 2008)
New Revision: 1132
Modified:
trunk/owl/perl/lib/BarnOwl/ModuleLoader.pm
Log:
Last change effectively aliased reload-module and reload-modules.
Splitting reload() to get desired behavior.
Modified: trunk/owl/perl/lib/BarnOwl/ModuleLoader.pm
===================================================================
--- trunk/owl/perl/lib/BarnOwl/ModuleLoader.pm 2008-09-29 22:47:36 UTC (rev 1131)
+++ trunk/owl/perl/lib/BarnOwl/ModuleLoader.pm 2008-09-29 23:24:37 UTC (rev 1132)
@@ -76,7 +76,7 @@
if(defined $parfile) {
PAR::reload_libs($parfile);
- $class->reload();
+ $class->run_startup_hooks();
} elsif(!defined eval "use BarnOwl::Module::$module") {
BarnOwl::error("Unable to load module $module: \n$@\n") if $@;
}
@@ -113,7 +113,11 @@
# Restore core modules from perlwrap.pm
$INC{$_} = 1 for (qw(BarnOwl.pm BarnOwl/Hooks.pm
BarnOwl/Message.pm BarnOwl/Style.pm));
+ $class->run_startup_hooks();
+}
+sub run_startup_hooks {
+ my $class = shift;
local $SIG{__WARN__} = \&squelch_redefine;
$class->load_all;
$BarnOwl::Hooks::startup->run(1);