Subject: | failed plugins should die |
When a plugin fails to load (for example it can't be found or it dies with a compilation error) Maypole::Application->import() sends a warning to the Apache errorlog. I don't believe this response is serious enough, and I think Maypole should die.
In the nature of plugins, there may be no run-time error to reveal the missing plugin later. There may just be different or absent behaviour of the website, which may take some time to notice. Actions taken by users during this time could have undesirable consequences.
If Maypole dies when plugin-loading fails, it helps administrators and developers be sure that the public service corresponds to the one that was tested.
Here's a very simple patch :)
--- Maypole/Application.pm Tue Jan 25 21:53:08 2005
+++ Maypole/Application.pm Fri Jan 28 10:45:12 2005
@@ -31,7 +31,7 @@
warn "Loaded plugin: $plugin"
if $caller->can('debug') && $caller->debug;
} else {
- warn qq(Loading plugin "$plugin" failed: )
+ die qq(Loading plugin "$plugin" failed: )
. $UNIVERSAL::require::ERROR;
}
}
Cheers, Dave