Skip Menu |

This queue is for tickets about the MediaWiki-API CPAN distribution.

Report information
The Basics
Id: 46061
Status: resolved
Priority: 0/
Queue: MediaWiki-API

People
Owner: Nobody in particular
Requestors: jidanni [...] jidanni.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



CC: chenjt30 [...] gmail.com
Subject: Can't locate object method "new" via package "JSON::XS" at /usr/share/perl5/MediaWiki/API.pm line 178.
Date: Thu, 14 May 2009 10:37:46 +0800
To: bug-mediawiki-api [...] rt.cpan.org
From: jidanni [...] jidanni.org
chenjt30: I was going to clean up a lot of old test files very quickly instead of by hand, but: Jools: Can't locate object method "new" via package "JSON::XS" at /usr/share/perl5/MediaWiki/API.pm line 178.
On Wed May 13 22:38:14 2009, jidanni@jidanni.org wrote: Show quoted text
> chenjt30: I was going to clean up a lot of old test files very quickly > instead of by hand, but: > Jools: > Can't locate object method "new" via package "JSON::XS" at > /usr/share/perl5/MediaWiki/API.pm line 178.
This is in reference to the unreleased 0.26 version right ? (if so please use the previous bug thread) I hadn't switched another reference to JSON::XS. now switched both to JSON. I have uploaded a new version http://malus.exotica.org.uk/~buzz/cpan/MediaWiki-API-0.26.tar.gz
Subject: Re: [rt.cpan.org #46061] Can't locate object method "new" via package "JSON::XS" at /usr/share/perl5/MediaWiki/API.pm line 178.
Date: Thu, 14 May 2009 14:50:32 +0800
To: bug-mediawiki-api [...] rt.cpan.org
From: jidanni [...] jidanni.org
Show quoted text
> please use the previous bug thread)
Can you make a .deb for me? These threads are tough. Can you give me a off-list address for trivia? Thanks.
On Thu May 14 02:52:44 2009, jidanni@jidanni.org wrote: Show quoted text
> > please use the previous bug thread)
> Can you make a .deb for me? These threads are tough. Can you give me a > off-list address for trivia? Thanks.
my email is on my cpan page and in the documentation :) buzz [at] exotica.org.uk deb uploaded to http://malus.exotica.org.uk/~buzz/cpan/libmediawiki-api-perl_0.26-1_all.deb
Subject: Re: [rt.cpan.org #46061] Can't locate object method "new" via package "JSON::XS" at /usr/share/perl5/MediaWiki/API.pm line 178.
Date: Fri, 15 May 2009 21:20:33 +0800
To: bug-mediawiki-api [...] rt.cpan.org
From: jidanni [...] jidanni.org
"Jools Smyth via RT" <bug-MediaWiki-API@rt.cpan.org> writes: Show quoted text
OK, thanks. P.S., after doing what make uninstall said to clean up the non-deb 0.25, there was residue left: # find /usr/local/lib/ -ctime -44 /usr/local/lib/ /usr/local/lib/perl /usr/local/lib/perl/5.10.0 /usr/local/lib/perl/5.10.0/auto /usr/local/lib/perl/5.10.0/auto/MediaWiki /usr/local/lib/perl/5.10.0/auto/MediaWiki/API /usr/local/lib/perl/5.10.0/perllocal.pod # find /usr/local/share/perl/ /usr/local/share/perl/ /usr/local/share/perl/5.10.0 /usr/local/share/perl/5.10.0/MediaWiki BTW: Me accidentally setting apnamespace=> $_ when $_ was not set caused Use of uninitialized value in concatenation (.) or string at /usr/share/perl5/MediaWiki/API.pm line 713. maybe you want to catch or ignore this... Wait, via my accident, I discovered how to print all namespaces in one command. However, one line got repeated!!: $ ./myapiscript|uniq --repeated 24 2 使用者:Wikia $ cat myapiscript #!/usr/bin/perl use strict; use warnings FATAL => q(all); use MediaWiki::API; use open qw/:std :encoding(utf8)/; my $mw = MediaWiki::API->new(); $mw->{config}->{api_url} = 'http://taizhongbus.wikia.com/api.php'; $mw->{config}->{use_http_get} = 1; $mw->{ua}->env_proxy; my $articles = $mw->list( { action => 'query', list => 'allpages', apnamespace => '', } ) || die $mw->{error}->{code} . ': ' . $mw->{error}->{details}; foreach ( @{$articles} ) { print "$_->{pageid}\t$_->{ns}\t$_->{title}\n"; }
Are you saying that the JSON::XS problem is gone now with my latest version? In regards to any other issues with repeating lines returns, please open a new bug for that. I'm going to assume that the problem is gone, and upload my 0.27 version now.