Skip Menu |
 

This queue is for tickets about the JSON-RPC CPAN distribution.

Report information
The Basics
Id: 57040
Status: new
Priority: 0/
Queue: JSON-RPC

People
Owner: Nobody in particular
Requestors: e-user [...] fsfe.org
Cc:
AdminCc:

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

Attachments


Subject: modules always set in scalar context
Download (untitled) / with headers
text/plain 572b
Distribution: JSON-RPC-0.96 Perl: 5.10.1 OS: GNU/Linux (Fedora 13 beta) JSON::RPC::Server::Apache2::handle uses $r->dir_config to retrieve RPC modules to dispatch to but two bugs at the same time prevent more than one value to be set: dir_config (arg) always returns just the value of the first matching entry for key `arg', dir_config->get (arg) (APR::Table method) must be used to get all matching entries and return an array; furthermore the boolean OR prevents array context so two separate statements are required. The attached patch fixes this issue. Best regards
Subject: perl-JSON-RPC-0.96-scalarfix.patch
diff -up JSON-RPC-0.96/lib/JSON/RPC/Server/Apache2.pm.scalarfix JSON-RPC-0.96/lib/JSON/RPC/Server/Apache2.pm --- JSON-RPC-0.96/lib/JSON/RPC/Server/Apache2.pm.scalarfix 2010-04-29 16:15:46.000000000 +0200 +++ JSON-RPC-0.96/lib/JSON/RPC/Server/Apache2.pm 2010-04-29 16:36:49.000000000 +0200 @@ -26,7 +26,8 @@ sub handler { $s->{path_info} = $r->path_info; - my @modules = $r->dir_config('dispatch') || $r->dir_config('dispatch_to'); + my @modules = $r->dir_config->get('dispatch'); + @modules = $r->dir_config->get('dispatch_to') unless @modules; $s->return_die_message( $r->dir_config('return_die_message') );


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.