Skip Menu |

This queue is for tickets about the WWW-Myspace CPAN distribution.

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

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

Bug Information
Severity: Important
Broken in: 0.15
Fixed in: 0.16



Subject: Bug in myspace::comments
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
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