Skip Menu |

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

Report information
The Basics
Id: 43340
Status: resolved
Priority: 0/
Queue: CGI-Application-Dispatch

People
Owner: MARKSTOS [...] cpan.org
Requestors: dekimsey [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 2.15
Fixed in: (no value)



Subject: $app->run() error handler breaks exception objects.
In the following block, the regex on line 702 destroys Exception::Class objects (AFAIK), to avoid doing this, the regex should check if $@ is a reference. CGI::Application::Dispatch || 694 eval { || 695 my $app = ref($args) eq 'HASH' ? $module->new($args) : $module->new(); || 696 $app->mode_param(sub { return $rm }) if($rm); || 697 $output = $app->run(); || 698 }; || 699 || 700 if($@) { || 701 # catch invalid run-mode stuff || 702 if($@ =~ /No such run mode/) { || 703 throw_not_found("RM '$rm' not found") || 704 # otherwise, just pass it up the chain || 705 } else { || 706 die $@; || 707 } || 708 } || 709 || 710 return $output; Something akin to the following resolves this issue. || 702 if(not ref $@ and $@ =~ /No such run mode/) {
Thanks. Your patch has been applied and will appear in the next release. Mark