Dokuwiki-RPC-XML-Client
view release on metacpan or search on metacpan
},
"name" : "Dokuwiki-RPC-XML-Client",
"prereqs" : {
"configure" : {
"requires" : {
"ExtUtils::MakeMaker" : "6.30"
}
},
"runtime" : {
"requires" : {
"Modern::Perl" : "0",
"Net::Netrc" : "0",
"RPC::XML::Client" : "0",
"YAML" : "0",
"parent" : "0",
"strict" : "0",
"warnings" : "0"
}
},
"test" : {
"requires" : {
configure_requires:
ExtUtils::MakeMaker: 6.30
dynamic_config: 0
generated_by: 'Dist::Zilla version 5.012, CPAN::Meta::Converter version 2.132830'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: 1.4
name: Dokuwiki-RPC-XML-Client
requires:
Modern::Perl: 0
Net::Netrc: 0
RPC::XML::Client: 0
YAML: 0
parent: 0
strict: 0
warnings: 0
resources:
homepage: https://github.com/eiro/p5-dokuwiki-rpc-xml-client
repository: https://github.com/eiro/p5-dokuwiki-rpc-xml-client.git
version: 0.2
Makefile.PL view on Meta::CPAN
"CONFIGURE_REQUIRES" => {
"ExtUtils::MakeMaker" => "6.30"
},
"DISTNAME" => "Dokuwiki-RPC-XML-Client",
"EXE_FILES" => [
"scripts/dokuwiki-client"
],
"LICENSE" => "perl",
"NAME" => "Dokuwiki::RPC::XML::Client",
"PREREQ_PM" => {
"Modern::Perl" => 0,
"Net::Netrc" => 0,
"RPC::XML::Client" => 0,
"YAML" => 0,
"parent" => 0,
"strict" => 0,
"warnings" => 0
},
"TEST_REQUIRES" => {
"Test::More" => 0
},
"VERSION" => "0.2",
"test" => {
"TESTS" => "t/*.t"
}
);
my %FallbackPrereqs = (
"Modern::Perl" => 0,
"Net::Netrc" => 0,
"RPC::XML::Client" => 0,
"Test::More" => 0,
"YAML" => 0,
"parent" => 0,
"strict" => 0,
"warnings" => 0
);
lib/Dokuwiki/RPC/XML/Client.pm view on Meta::CPAN
L<Dokuwiki::RPC::XML::Client> extends the L<RPC::XML::Client> with the Dokuwiki
XML-RPC methods (without namespace) described in the
L<dokuwiki xml-rpc page|https://www.dokuwiki.org/devel:xmlrpc>.
As example, a call to
L<wiki.getVersion|https://www.dokuwiki.org/devel:xmlrpc#dokuwikigetversion>
(which also require a call to
L<dokuwiki.login|https://www.dokuwiki.org/devel:xmlrpc#dokuwikilogin>) is:
use Dokuwiki::RPC::XML::Client;
use Modern::Perl;
my $wiki =
Dokuwiki::RPC::XML::Client
-> reach('https://wiki.example.com/');
$wiki->login(qw( editor s3cr3t ))->value or die;
say $wiki->getVersion->value;
=head1 the C<reach> constructor
lib/Dokuwiki/RPC/XML/Client.pm view on Meta::CPAN
but please refer to the
L<dokuwiki xml-rpc page|https://www.dokuwiki.org/devel:xmlrpc> for more details.
=head1 A REAL WORLD EXAMPLE USING C<~/.netrc>
getting the login and password from C<STDIN>, C<@ARGV> or hardcoded in your
source file is B<always> a bad idea. so this is an example to get things done
using the god damn old and good C<~/.netrc> file.
use Dokuwiki::RPC::XML::Client;
use Modern::Perl;
use Net::Netrc;
my $base = 'https://example.com/';
my $host = 'company';
my $wiki =
Dokuwiki::RPC::XML::Client
-> reach('https://wiki.example.com/');
my $credentials = Net::Netrc->lookup($host)
or die "please add a fake $host machine in your ~/.netrc";
scripts/dokuwiki-client view on Meta::CPAN
#! /usr/bin/perl
use Dokuwiki::RPC::XML::Client;
use Modern::Perl;
use Net::Netrc;
require YAML;
no warnings qw( once qw );
=head1 SYNOPSIS
dokuwiki-client is as cli wrapper to the XML::RPC perl client.
dokuwiki-client show getVersion
# prints the dokuwiki version
( run in 0.288 second using v1.01-cache-2.11-cpan-a5abf4f5562 )