Skip Menu |

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

Report information
The Basics
Id: 32399
Status: resolved
Priority: 0/
Queue: WWW-Myspace

People
Owner: Nobody in particular
Requestors: rob [...] veerob.com
Cc:
AdminCc:

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



Subject: Added sendername
Date: Thu, 17 Jan 2008 13:42:22 -0800
To: bug-www-myspace [...] rt.cpan.org
From: "Rob Perelman" <rob [...] veerob.com>
I wasn't able to use svn but I did generate a diff from the Myspace.pm 0.74. I hope this still works for you. 3568,3569d3567 < # Updated by veeRob on 1/16/08 to document sendername < # Updated by veeRob on 1/17/08 to change example from inbox() to get_inbox() 3576d3573 < sendername (friend's display name) 3612c3609 < my $messages = $myspace->get_inbox; --- Show quoted text
> my $messages = $myspace->inbox;
3617d3613 < print "Sendername: " . $message->{sendername} . "\n"; 3694d3689 < # Updated by veeRob on 1/16/08 to save the sender's name 3705d3699 < my $sendername; 3717c3711 < } elsif (/viewprofile&friendid=([0-9]+)"?>([^<>]+)</ && $state == 1){ --- Show quoted text
> } elsif (/viewprofile&friendid=([0-9]+)/ && $state == 1){
3719d3712 < $sendername = $2; 3727,3728c3720,3721 < push @messages, { sender => $sender, sendername => $sendername, status => $status, message_id=> $msg_id, subject => $subject }; < if ($DEBUG) { print $sender,"|",$sendername,"|",$status,"|",$msg_id,"|",$subject,"\n"; } --- Show quoted text
> push @messages, { sender => $sender, status => $status,
message_id=> $msg_id, subject => $subject }; Show quoted text
> if ($DEBUG) { print
$sender,"|",$status,"|",$msg_id,"|",$subject,"\n"; } -- Rob Perelman :: rob@veerob.com :: http://www.veerob.com
Subject: Re: [rt.cpan.org #32399] Added sendername
Date: Thu, 17 Jan 2008 16:00:04 -0800
To: bug-WWW-Myspace [...] rt.cpan.org
From: Grant Grueninger <grantg [...] spamarrest.com>
Hi Rob, Given that the change looks small, I might be able to manually patch the module. I need a context diff though. ("diff -c Myspace.pm.old Myspace.pm" on most UNIX sytems). We really need patches submitted against the current working copy though (the last release is of course always behind what we have). Grant On Jan 17, 2008, at 1:43 PM, Rob Perelman via RT wrote: Show quoted text
> > Thu Jan 17 16:42:54 2008: Request 32399 was acted upon. > Transaction: Ticket created by rob@veerob.com > Queue: WWW-Myspace > Subject: Added sendername > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: rob@veerob.com > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=32399 > > > > I wasn't able to use svn but I did generate a diff from the > Myspace.pm 0.74. > I hope this still works for you. > > 3568,3569d3567 > < # Updated by veeRob on 1/16/08 to document sendername > < # Updated by veeRob on 1/17/08 to change example from inbox() to > get_inbox() > 3576d3573 > < sendername (friend's display name) > 3612c3609 > < my $messages = $myspace->get_inbox; > ---
>> my $messages = $myspace->inbox;
> 3617d3613 > < print "Sendername: " . $message->{sendername} . "\n"; > 3694d3689 > < # Updated by veeRob on 1/16/08 to save the sender's name > 3705d3699 > < my $sendername; > 3717c3711 > < } elsif (/viewprofile&friendid=([0-9]+)"?>([^<>]+)</ && > $state == > 1){ > ---
>> } elsif (/viewprofile&friendid=([0-9]+)/ && $state == 1){
> 3719d3712 > < $sendername = $2; > 3727,3728c3720,3721 > < push @messages, { sender => $sender, sendername => > $sendername, status => $status, message_id=> $msg_id, subject => > $subject }; > < if ($DEBUG) { print > $sender,"|",$sendername,"|",$status,"|",$msg_id,"|",$subject,"\n"; } > ---
>> push @messages, { sender => $sender, status => $status,
> message_id=> $msg_id, subject => $subject };
>> if ($DEBUG) { print
> $sender,"|",$status,"|",$msg_id,"|",$subject,"\n"; } > > -- > Rob Perelman :: rob@veerob.com :: http://www.veerob.com > > I wasn't able to use svn but I did generate a diff from the > Myspace.pm 0.74. I hope this still works for you. > > 3568,3569d3567 > < # Updated by veeRob on 1/16/08 to document sendername > < # Updated by veeRob on 1/17/08 to change example from inbox() to > get_inbox() > 3576d3573 > < sendername (friend's display name) > 3612c3609 > < my $messages = $myspace->get_inbox; > ---
> > my $messages = $myspace->inbox;
> 3617d3613 > < print "Sendername: " . $message->{sendername} . "\n"; > 3694d3689 > < # Updated by veeRob on 1/16/08 to save the sender's name > 3705d3699 > < my $sendername; > 3717c3711 > < } elsif (/viewprofile&friendid=([0-9]+)"?>([^<>]+)</ && > $state == 1){ > ---
> > } elsif (/viewprofile&friendid=([0-9]+)/ && $state == 1){
> 3719d3712 > < $sendername = $2; > 3727,3728c3720,3721 > < push @messages, { sender => $sender, sendername => > $sendername, status => $status, message_id=> $msg_id, subject => > $subject }; > < if ($DEBUG) { print $sender,"|",$sendername,"|", > $status,"|",$msg_id,"|",$subject,"\n"; } > ---
> > push @messages, { sender => $sender, status =>
> $status, message_id=> $msg_id, subject => $subject };
> > if ($DEBUG) { print $sender,"|",$status,"|",
> $msg_id,"|",$subject,"\n"; } > > -- > Rob Perelman :: rob@veerob.com :: http://www.veerob.com
Subject: Re: [rt.cpan.org #32399] Added sendername
Date: Thu, 17 Jan 2008 17:00:17 -0800
To: bug-WWW-Myspace [...] rt.cpan.org
From: "Rob Perelman" <rob [...] veerob.com>
As I said, I will work on getting the svn up and running. In the meantime, here is the diff -c output. *** Myspace.pm Thu Jan 17 13:40:15 2008 --- Myspace.pm.074 Tue Nov 20 19:20:28 2007 *************** *** 3565,3579 **** } - # Updated by veeRob on 1/16/08 to document sendername - # Updated by veeRob on 1/17/08 to change example from inbox() to get_inbox() =head2 get_inbox ( %options ) Returns a reference to an array of hash references that contain data about the messages in your Myspace message inbox. The hashes contain: sender (friendID) - sendername (friend's display name) status (Read, Unread, Sent, Replied) message_id (The unique ID of the message) subject (The subject of the message) --- 3565,3576 ---- *************** *** 3609,3620 **** $myspace = new WWW::Myspace; print "Getting inbox...\n"; ! my $messages = $myspace->get_inbox; # Display data for each message foreach $message ( @{$messages} ) { print "Sender: " . $message->{sender} . "\n"; - print "Sendername: " . $message->{sendername} . "\n"; print "Status: " . $message->{status} . "\n"; print "messageID: " . $message->{message_id} . "\n"; print "Subject: " . $message->{subject} . "\n\n"; --- 3606,3616 ---- $myspace = new WWW::Myspace; print "Getting inbox...\n"; ! my $messages = $myspace->inbox; # Display data for each message foreach $message ( @{$messages} ) { print "Sender: " . $message->{sender} . "\n"; print "Status: " . $message->{status} . "\n"; print "messageID: " . $message->{message_id} . "\n"; print "Subject: " . $message->{subject} . "\n\n"; *************** *** 3691,3697 **** # Return a list of message data from the current page # Updated by WZorn to fix hanging problem on Mandriva and RetHat linux. - # Updated by veeRob on 1/16/08 to save the sender's name sub _get_messages_from_page { my ( %options ) = @_; --- 3687,3692 ---- *************** *** 3702,3708 **** # 1 - In message block, looking for data # Will return to state=0 when we get the last data (messageID and subject) my $sender; - my $sendername; my $status; my $msg_id; my $subject; --- 3697,3702 ---- *************** *** 3714,3722 **** if(/<td class="messageListCell" align="center">/){ # Found beginning of Message block $state = 1; ! } elsif (/viewprofile&friendid=([0-9]+)"?>([^<>]+)</ && $state == 1){ $sender = $1; - $sendername = $2; } elsif (/(Unread|Read|Sent|Replied)/ && $state == 1){ $status = $1; } elsif (/messageID=([^&]+)&.*?>(.+?)<\/a>/ && $state == 1){ --- 3708,3715 ---- if(/<td class="messageListCell" align="center">/){ # Found beginning of Message block $state = 1; ! } elsif (/viewprofile&friendid=([0-9]+)/ && $state == 1){ $sender = $1; } elsif (/(Unread|Read|Sent|Replied)/ && $state == 1){ $status = $1; } elsif (/messageID=([^&]+)&.*?>(.+?)<\/a>/ && $state == 1){ *************** *** 3724,3731 **** $subject = $2; $state = 0; #return to state=0 because we need to start looking for the beginning of the next message block ! push @messages, { sender => $sender, sendername => $sendername, status => $status, message_id=> $msg_id, subject => $subject }; ! if ($DEBUG) { print $sender,"|",$sendername,"|",$status,"|",$msg_id,"|",$subject,"\n"; } } } return @messages; --- 3717,3724 ---- $subject = $2; $state = 0; #return to state=0 because we need to start looking for the beginning of the next message block ! push @messages, { sender => $sender, status => $status, message_id=> $msg_id, subject => $subject }; ! if ($DEBUG) { print $sender,"|",$status,"|",$msg_id,"|",$subject,"\n"; } } } return @messages; -- Rob Perelman :: rob@veerob.com :: http://www.veerob.com
Patch applied months ago - closing ticket.