Skip Menu |

This queue is for tickets about the Maypole CPAN distribution.

Report information
The Basics
Id: 11270
Status: resolved
Priority: 0/
Queue: Maypole

People
Owner: SIMONFLK [...] cpan.org
Requestors: dhoworth [...] mrc-lmb.cam.ac.uk
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: 2.09
Fixed in: 2.10



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
[guest - Fri Jan 28 06:01:32 2005]: Show quoted text
> 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.
Agreed. I'll change the warn() to a die(). Thanks Simon
[SIMONFLK - Fri Jan 28 09:20:40 2005]: Show quoted text
> [guest - Fri Jan 28 06:01:32 2005]: >
> > 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.
> > Agreed. I'll change the warn() to a die(). >
Change applied in SVN