Subject: | Stray warnings when creating a page... |
Date: | Tue, 18 Nov 2008 17:25:34 +0000 |
To: | bug-MediaWiki-API [...] rt.cpan.org |
From: | "Dan Bolser" <dan.bolser [...] gmail.com> |
hihi
I am using MediaWiki::API to create a series of pages. I keep getting
the following non-fatal error:
Use of uninitialized value in subroutine entry at
/usr/lib/perl5/5.8.8/i386-linux-thread-multi/Encode.pm line 196.
The relevant part of my code looks like this:
my $pagename = "Test:EntryPoint:$segId";
my $page = $mw->get_page( { title => $pagename } );
if ( defined($page->{missing}) ) {
my $pagetext = "
This is an entry point ($segId).
{{EntryPoint
| id = $segId
| size = $ref->{$segId}{'size'}
| start = $ref->{$segId}{'start'}
| end = $ref->{$segId}{'stop'}
| class = $ref->{$segId}{'class'}
| orientation = $ref->{$segId}{'orientation'}
| subparts = $ref->{$segId}{'subparts'}
}}
";
my $timestamp = $ref->{timestamp};
$mw->edit( {
action => 'edit',
title => $pagename,
basetimestamp => $timestamp, # to avoid edit conflicts
text => $pagetext } );
}
else{
warn "$pagename already exists\nskipping\n";
next;
}
#exit;
}
I get one of the above style warnings per page. I guess its not
serious, because other than that its all working fine :D
Dan.
--
http://network.nature.com/profile/dan