Apache/XMLRPC.pm untested

filter: Statementstmt 0.0% 0 / 21 Branchbran 0.0% 0 / 10 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 3 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 35 CC 6 SCAR 34.7
CC
6
Cov
0%
handler
42.0
BEGIN
2.0
BEGIN
2.0
CRAP 32.0
1 #
2 # Module Copyright (C) 2000 Ed Hill
3 # Documentation Copyright (C) 2000 Tim Peoples
4 #
5 # Apache::XMLRPC is free software; you can redistribute it
6 # and/or modify it under the same terms as Perl itself.
7 #
8 # $Id: XMLRPC.pm,v 1.2 2000/11/09 01:36:34 kmacleod Exp $
9 #
10  
11 package Apache::XMLRPC;
12  
13 use Apache::Constants qw(:common);
14 use Frontier::RPC2;
15  
16 sub handler {
17 my $r = shift;
18  
19 my $conf = $r->server_root_relative( $r->dir_config( "XMLRPC_Config" ) );
20  
21 if( -f $conf ) {
22 unless( $rt = do $conf ) {
23 die "Couldn\'t parse conf file ($conf): $@\n" if $@;
24 die "Couldn\'t compile conf file ($conf): $!\n" unless defined $rt;
25 die "Couldn\'t run conf file ($conf)\n" unless $rt;
26 }
27 }
28  
29 my $decoder = Frontier::RPC2->new();
30  
31 my $content;
32 $r->read( $content, $r->header_in( 'Content-length' ) );
33  
34 my $answer = $decoder->serve( $content, $Apache::XMLRPC::map );
35  
36 $r->send_http_header();
37 $r->print($answer);
38  
39 return OK;
40 }
41  
42 1;
43  
44 __END__