Skip Menu |

This queue is for tickets about the CGI-Application-Plugin-AutoRunmode CPAN distribution.

Report information
The Basics
Id: 35987
Status: resolved
Priority: 0/
Queue: CGI-Application-Plugin-AutoRunmode

People
Owner: thilo [...] cpan.org
Requestors: aku.kauste [...] curling.fi
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in:
  • 0.15
  • 0.16
Fixed in: 0.17



Subject: StartRunmode dies with Apache2::Reload
I'm using mod_perl2 and Apache2::Reload on development machine. The problem is that CGI::Application::Plugin::AutoRunmode dies when StartRunmode is already installed. I would like to see it only warning about that. The fix is easy, just replace die with warn on line 180-181: die "StartRunmode for package $pkg is already installed\n" if defined *{"${pkg}::start_mode"}; warn "StartRunmode for package $pkg is already installed\n" if defined *{"${pkg}::start_mode"}; Or maybe a check, if running under mod_perl and Apache2:Reload is more apropriate: if( $ENV{MOD_PERL} && exists $INC{'Apache2/Reload.pm'} ) { warn "StartRunmode for package $pkg is already installed\n" if defined *{"${pkg}::start_mode"}; } else { die "StartRunmode for package $pkg is already installed\n" if defined *{"${pkg}::start_mode"}; } At least I fixed it like this locally.
I suppose with Apache2::Reload you do not even want the warning. I added a check for Apache2::Reload (as per your suggestion) and in this case the module will not raise an error if a StartRunmode or ErrorRunmode is installed more than once. http://bitbucket.org/thiloplanz/cgi-application-plugin-autorunmode/changeset/8ecbc2c86893/ This will be included in the next release.
Reopened because fix did not work, see bug 57655. https://rt.cpan.org/Ticket/Display.html?id=57655