Skip Menu |

This queue is for tickets about the Web-Simple CPAN distribution.

Report information
The Basics
Id: 97339
Status: new
Priority: 0/
Queue: Web-Simple

People
Owner: Nobody in particular
Requestors: marius [...] ieval.ro
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 0.028
Fixed in: (no value)



Subject: Allow dispatchers to return false
If a dispatcher returns a false value, WD should continue with the next dispatcher instead of dying with.Use of uninitialized value in subroutine entry at /usr/share/perl5/Web/Dispatch.pm line 129. For example, the following script should work without the dummy response_filter: #!/usr/bin/perl -w use v5.14; package Example; use Web::Simple; sub dispatch_request{ sub (?:param=) { return [403, ['Content-Type' => 'text/plain'], ['Forbidden']] unless $_{param} =~ /^\w+$/; response_filter { shift }; # Dummy response_filter }, sub (/a + ?:param=) { ... }, sub (/b + ?:param=) { ... }, sub (/c + ?:param=) { ... }, sub (/d + ?:param=) { ... }, } Example->run_if_script;