-foreach my $file (
- glob("$site_perl/*.pm"),
- glob("$site_perl/*/*.pm"),
- glob("$site_perl/*/*/*.pm"),
- glob("$site_perl/bin/*.pod"),
- glob("./fs_sesmon/FS-SessionClient/*.pm"),
- glob("./fs_signup/FS-SignupClient/*.pm"),
- glob("./fs_selfadmin/FS-MailAdminServer/*.pm"),
-) {
+#just for filename_to_pagename for now
+use WWW::Mediawiki::Client;
+my $mvs = WWW::Mediawiki::Client->new(
+ 'host' => 'www.freeside.biz',
+ 'protocol' => 'https',
+ 'wiki_path' => 'mediawiki/index.php',
+ 'username' => $mw_username,
+ 'password' => $mw_password,
+ #'commit_message' => 'import from POD'
+ );
+#$mvs->do_login;
+
+use MediaWiki;
+
+my $c = MediaWiki->new;
+# $is_ok = $c->setup("config.ini");
+$c->setup({
+ 'bot' => { 'user' => $mw_username, 'pass' => $mw_password },
+ 'wiki' => {
+ 'host' => 'www.freeside.biz',
+ 'path' => 'mediawiki',
+ #'has_query' => 1,
+
+ }
+}) or die "Mediawiki->setup failed";
+
+my @files;
+if ( @ARGV ) {
+ @files = @ARGV;
+} else {
+ @files = (
+ glob("$site_perl/*.pm"),
+ glob("$site_perl/*/*.pm"),
+ glob("$site_perl/*/*/*.pm"),
+ glob("$site_perl/*/*/*/*.pm"),
+ glob("$site_perl/bin/*.pod"),
+ glob("./fs_selfservice/FS-SelfService/*.pm"),
+ glob("./fs_selfservice/FS-SelfService/*/*.pm"),
+ );
+
+}
+
+foreach my $file (@files) {