Skip Menu | You are currently an anonymous guest. | Login | Return to Main | About rt.cpan.org
 

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.

X Report information
Id: 17379
Status: resolved
Estimated: 1 hour (60 min)
Worked: 1 hour (60 min)
Left: 5 min
Priority: 0/0
Queue: WWW-Myspace

Owner: GRANTG <GRANTG [...] cpan.org>
Requestors: info [...] tomkerswill.co.uk
Cc:
AdminCc:

Severity: Important
Broken in: 0.15
Fixed in: 0.16



X History Display mode: Brief headersFull headers
#   Mon Jan 30 20:26:53 2006 guest - Ticket created  
Subject: Bug in myspace::comments
[text/plain 915b]
I get the following error message when trying to use the main "Example 1" and "Example 2"
scripts on the myspace::comments man page.

Can't use an undefined value as an ARRAY reference at /usr/lib/perl5/site_perl/5.8.0/WWW/
Myspace/Comment.pm line 124, <STDIN> line 2.

*Code that reproduces bug:
use WWW::Myspace;
use WWW::Myspace::Comment;

my $myspace = new WWW::Myspace;

my $comment = WWW::Myspace::Comment->new( $myspace );
my $response = "";

while ( $response ne "DONE" ) {
$response = $comment->post_comments( "Evening!" );
sleep 24*60*60;
}

Other info:
* Accepting friends requests and sending them comments works fine
* There were some problems installing YAML - had to force install it. After that www-
myspace installed fine
* I'm not sure whether expat is working
* perl v5.8.0
* Linux p15161741.pureserver.info 2.4.25-040218 #1 SMP Wed Feb 18 17:59:29 CET 2004
i686 i686 i386 GNU/Linux

#   Mon Jan 30 20:55:03 2006 GRANTG - Taken  
#   Mon Jan 30 20:59:38 2006 GRANTG - TimeEstimated changed from (no value) to '60'  
#   Mon Jan 30 20:59:38 2006 GRANTG - Status changed from 'new' to 'open'  
#   Mon Jan 30 20:59:39 2006 GRANTG - Broken in 0.15 added  
#   Mon Jan 30 21:10:03 2006 GRANTG - Correspondence added  
[text/plain 497b]
Good catch - Looks like a bug in the default handling of friend_ids in the post_comments
method.

I'm working on a fix now. To work around it, add the list of friends explicitly like this:
$response = $comment->post_comments( "Evening!" , $myspace->get_friends );

If expat weren't installed right, you'd probably have gotten a nasty error when it tried to log in.
If YAML isn't installed right, it would (I think) just break the save and load methods in
WWW::Myspace::Message.

Thanks,

Grant
#   Mon Jan 30 21:31:39 2006 GRANTG - Reminder 'Enter fixed in, resolve' added  
#   Mon Jan 30 21:32:25 2006 GRANTG - Reminder 'Enter "fixed in 0.16", Resolve ticket' added  
#   Mon Jan 30 21:32:36 2006 GRANTG - Reminder 'Enter fixed in, resolve' completed  
#   Mon Jan 30 21:32:55 2006 GRANTG - Reminder 'Enter "fixed in 0.16", Resolve ticket' added  
#   Mon Jan 30 21:33:01 2006 GRANTG - Reminder 'Enter "fixed in 0.16", Resolve ticket' completed  
#   Mon Jan 30 21:47:27 2006 GRANTG - TimeWorked changed from (no value) to '55'  
#   Mon Jan 30 21:47:41 2006 GRANTG - TimeLeft changed from (no value) to '5'  
#   Tue Jan 31 03:20:30 2006 GRANTG - Status changed from 'open' to 'resolved'  
#   Tue Jan 31 03:20:39 2006 GRANTG - Reminder 'Enter "fixed in 0.16", Resolve ticket' completed  
#   Thu Feb 02 17:48:29 2006 GRANTG - Fixed in 0.16 added