You are here Home > Know-how > MediaWiki - CMS > Interfaces / API's > Perl Interface
MediaWiki - CMS
 

8.5.1 Perl Interface

15.06.2007
8.5 Interfaces / API's [  up  ] - [ A - Z ] - [ top ] 8.5.1.1 WWW::Mediawiki::Client

CMS::MediaWiki

Create or update MediaWiki pages. An update of a MediaWiki page can also be reduced to a specific page section. You may update many pages with the same object handle ($mw in the shown example).

You could change the login name between an update. This might be necessary if you would like to update a public page *and* a protected page by the WikiSysop user in just one cycle.

SYNOPSIS

  use CMS::MediaWiki;

  my $rmw = CMS::MediaWiki->new(
        host  => 'localhost',
        path  => 'wiki' ,
        debug => 0  # 0, 1 or 2
  );

DESCRIPTION

my $rc = $rmw->login(
        #host => 'localhost' ,  # optional here, but wins
        #path => 'wiki',        # optional here, but wins

        user => 'Reto' ,
        pass => 'yourpass' ,
);

$rc = $rmw->editPage(
        title => 'Online_Directory:Computers:Software:Internet:Authoring' ,

        section => '' , #  2 means edit second section etc.
                        # '' means no section (edit the full page)

        text    => "== foo bar ==\nbar foo\n\n",

        summary => "Your Summary" ,
);



See also:


8.5 Interfaces / API's       A - Z Index       Top       Disclaimer       8.5.1.1 WWW::Mediawiki::Client


$Id: perl.html,v 1.94 2007/06/15 11:49:14 webcms Exp $
copyright © 2005-2007 by reto