{"id":30211269,"url":"https://github.com/mons/xml-rpc-fast","last_synced_at":"2025-08-13T20:35:37.316Z","repository":{"id":136417613,"uuid":"1327735","full_name":"Mons/XML-RPC-Fast","owner":"Mons","description":"Fast and modular implementation for an XML-RPC client and server","archived":false,"fork":false,"pushed_at":"2012-07-19T11:41:06.000Z","size":908,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-03-10T20:33:18.820Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://search.cpan.org/dist/XML-RPC-Fast","language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Mons.png","metadata":{"files":{"readme":"README","changelog":"Changes","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-02-04T11:21:48.000Z","updated_at":"2023-03-10T20:46:09.067Z","dependencies_parsed_at":"2023-03-10T20:46:09.013Z","dependency_job_id":null,"html_url":"https://github.com/Mons/XML-RPC-Fast","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"purl":"pkg:github/Mons/XML-RPC-Fast","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mons%2FXML-RPC-Fast","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mons%2FXML-RPC-Fast/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mons%2FXML-RPC-Fast/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mons%2FXML-RPC-Fast/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mons","download_url":"https://codeload.github.com/Mons/XML-RPC-Fast/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mons%2FXML-RPC-Fast/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270305853,"owners_count":24562110,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-13T02:00:09.904Z","response_time":66,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-08-13T20:34:24.714Z","updated_at":"2025-08-13T20:35:37.264Z","avatar_url":"https://github.com/Mons.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"NAME\n    XML::RPC::Fast - Fast and modular implementation for an XML-RPC client\n    and server\n\nSYNOPSIS\n    Generic usage\n\n        use XML::RPC::Fast;\n\n        my $server = XML::RPC::Fast-\u003enew( undef, %args );\n        my $client = XML::RPC::Fast-\u003enew( $uri,  %args );\n\n    Create a simple XML-RPC service:\n\n        use XML::RPC::Fast;\n\n        my $rpc = XML::RPC::Fast-\u003enew(\n        undef,                         # the url is not required by server\n        external_encoding =\u003e 'koi8-r', # any encoding, accepted by Encode\n        #internal_encoding =\u003e 'koi8-r', # not supported for now\n        );\n        my $xml = do { local $/; \u003cSTDIN\u003e };\n        length($xml) == $ENV{CONTENT_LENGTH} or warn \"Content-Length differs from actually received\";\n\n        print \"Content-type: text/xml; charset=$rpc-\u003e{external_encoding}\\n\\n\";\n        print $rpc-\u003ereceive( $xml, sub {\n        my ( $methodname, @params ) = @_;\n        return { you_called =\u003e $methodname, with_params =\u003e \\@params };\n        } );\n\n    Make a call to an XML-RPC service:\n\n        use XML::RPC::Fast;\n\n        my $rpc = XML::RPC::Fast-\u003enew(\n        'http://your.hostname/rpc/url'\n        );\n\n        # Syncronous call\n        my @result = $rpc-\u003ereq(\n        call =\u003e [ 'examples.getStateStruct', { state1 =\u003e 12, state2 =\u003e 28 } ],\n        url =\u003e 'http://...',\n        );\n\n        # Syncronous call (compatibility method)\n        my @result = $rpc-\u003ecall( 'examples.getStateStruct', { state1 =\u003e 12, state2 =\u003e 28 } );\n\n        # Syncronous or asyncronous call\n        $rpc-\u003ereq(\n        call =\u003e ['examples.getStateStruct', { state1 =\u003e 12, state2 =\u003e 28 }],\n        cb   =\u003e sub {\n            my @result = @_;\n        },\n        );\n\n        # Syncronous or asyncronous call (compatibility method)\n        $rpc-\u003ecall( sub {\n        my @result = @_;\n\n        }, 'examples.getStateStruct', { state1 =\u003e 12, state2 =\u003e 28 } );\n\nDESCRIPTION\n    XML::RPC::Fast is format-compatible with XML::RPC, but may use different\n    encoders to parse/compose xml. Curerntly included encoder uses\n    XML::LibXML, and is 3 times faster than XML::RPC and 75% faster, than\n    XML::Parser implementation\n\nMETHODS\n  new ($url, %args)\n    Create XML::RPC::Fast object, server if url is undef, client if url is\n    defined\n\n  req( %ARGS )\n    Clientside. Make syncronous or asyncronous call (depends on UA).\n\n    If have cb, will invoke $cb with results and should not croak\n\n    If have no cb, will return results and croak on error (only syncronous\n    UA)\n\n    Arguments are\n\n    call =\u003e [ methodName =\u003e @args ]\n        array ref of call arguments. Required\n\n    cb =\u003e $cb-\u003e(@results)\n        Invocation callback. Optional for syncronous UA. Behaviour is same\n        as in call with $cb and without\n\n    url =\u003e $request_url\n        Alternative invocation URL. Optional. By default will be used\n        defined from constructor\n\n    headers =\u003e { http-headers hashref }\n        Additional http headers to request\n\n    external_encoding =\u003e '...,\n        Specify the encoding, used inside XML container just for this\n        request. Passed to encoder\n\n  call( 'method_name', @arguments ) : @results\n    Clientside. Make syncronous call and return results. Croaks on error.\n    Just a simple wrapper around \"req\"\n\n  call( $cb-\u003e(@res), 'method_name', @arguments ): void\n    Clientside. Make syncronous or asyncronous call (depends on UA) and\n    invoke $cb with results. Should not croak. Just a simple wrapper around\n    \"req\"\n\n  receive ( $xml, $handler-\u003e($methodName,@args) ) : xml byte-stream\n    Serverside. Process received XML and invoke $handler with parameters\n    $methodName and @args and returns response XML\n\n    On error conditions $handler could set $XML::RPC::Fast::faultCode and\n    die, or return \"rpcfault($faultCode,$faultString)\"\n\n        -\u003ereceive( $xml, sub {\n        # ...\n        return rpcfault( 3, \"Some error\" ) if $error_condition\n        $XML::RPC::Fast::faultCode = 4 and die \"Another error\" if $another_error_condition;\n\n        return { call =\u003e $methodname, params =\u003e \\@params };\n        })\n\n  registerType\n    Proxy-method to encoder. See XML::RPC::Enc\n\n  registerClass\n    Proxy-method to encoder. See XML::RPC::Enc\n\nOPTIONS\n    Below is the options, accepted by new()\n\n  ua\n    Client only. Useragent object, or package name\n\n        -\u003enew( $url, ua =\u003e 'LWP' ) # same as XML::RPC::UA::LWP\n        # or \n        -\u003enew( $url, ua =\u003e 'XML::RPC::UA::LWP' )\n        # or \n        -\u003enew( $url, ua =\u003e XML::RPC::UA::LWP-\u003enew( ... ) )\n        # or \n        -\u003enew( $url, ua =\u003e XML::RPC::UA::Curl-\u003enew( ... ) )\n\n  timeout\n    Client only. Timeout for calls. Passed directly to UA\n\n        -\u003enew( $url, ua =\u003e 'LWP', timeout =\u003e 10 )\n\n  useragent\n    Client only. Useragent string. Passed directly to UA\n\n        -\u003enew( $url, ua =\u003e 'LWP', useragent =\u003e 'YourClient/1.11' )\n\n  encoder\n    Client and server. Encoder object or package name\n\n        -\u003enew( $url, encoder =\u003e 'LibXML' )\n        # or \n        -\u003enew( $url, encoder =\u003e 'XML::RPC::Enc::LibXML' )\n        # or \n        -\u003enew( $url, encoder =\u003e XML::RPC::Enc::LibXML-\u003enew( ... ) )\n\n  internal_encoding NOT IMPLEMENTED YET\n    Specify the encoding you are using in your code. By default option is\n    undef, which means flagged utf-8 For translations is used Encode, so the\n    list of accepted encodings fully derived from it.\n\n  external_encoding\n    Specify the encoding, used inside XML container. By default it's utf-8.\n    Passed directly to encoder\n\n        -\u003enew( $url, encoder =\u003e 'LibXML', external_encoding =\u003e 'koi8-r' )\n\nACCESSORS\n  url\n    Get or set client url\n\n  encoder\n    Direct access to encoder object\n\n  ua\n    Direct access to useragent object\n\nFUNCTIONS\n  rpcfault(faultCode, faultString)\n    Returns hash structure, that may be returned by serverside handler,\n    instead of die. Not exported by default\n\nCUSTOM TYPES\n  sub {{ 'base64' =\u003e encode_base64($data) }}\n    When passing a CODEREF as a value, encoder will simply use the returned\n    hashref as a type =\u003e value pair.\n\n  bless( do{\\(my $o = encode_base64('test') )}, 'base64' )\n    When passing SCALARREF as a value, package name will be taken as type\n    and dereference as a value\n\n  bless( do{\\(my $o = { something =\u003e'complex' } )}, 'base64' )\n    When passing REFREF as a value, package name will be taken as type and\n    XML::Hash::LX\"::hash2xml(deref)\" would be used as value\n\n  customtype( $type, $data )\n    Easily compose SCALARREF based custom type\n\nBUGS \u0026 SUPPORT\n    Bugs reports and testcases are welcome.\n\n    It you write your own Enc or UA, I may include it into distribution\n\n    If you have propositions for default custom types (see Enc), send me\n    patches\n\n    See \u003chttp://rt.cpan.org\u003e to report and view bugs.\n\nAUTHOR\n    Mons Anderson, \"\u003cmons@cpan.org\u003e\"\n\nCOPYRIGHT \u0026 LICENSE\n    Copyright (c) 2008-2009 Mons Anderson.\n\n    This program is free software; you can redistribute it and/or modify it\n    under the same terms as Perl itself.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmons%2Fxml-rpc-fast","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmons%2Fxml-rpc-fast","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmons%2Fxml-rpc-fast/lists"}