download
zackse@ahumado:/opt/src$ diff -ur PerlMonksModules/ PerlMonksModules.n
+ew/
diff -ur PerlMonksModules/PerlMonks/Chat.pm PerlMonksModules.new/PerlM
+onks/Chat.pm
--- PerlMonksModules/PerlMonks/Chat.pm Mon Aug 19 12:39:56 2002
+++ PerlMonksModules.new/PerlMonks/Chat.pm Sat Aug 24 01:16:15 20
+02
@@ -58,7 +58,7 @@
# Get general chat messages
if ($c=$self->getpage(CHAT_URL)) {
$c=~s/[\r\n\t]//g;
- my @msgs=($c=~/message\s+author="([^\"]+)"[^>]+>\s*(.*?)\s*<\/mes
+sage>/g);
+ my @msgs=($c=~/message\s+user_id="\d+"\s+author="([^\"]+)"[^>]+>\
+s*(.*?)\s*<\/message>/g);
if (@msgs) {
while (@msgs) {
my ($author, $msg)=(shift(@msgs),shift(@msgs));
@@ -91,9 +91,10 @@
if ($self->{cookie_jar}) {
if ($c=$self->getpage(PRIVATE_URL)) {
$c=~s/[\r\n\t]//g;
- my @msgs=($c=~/message\s+message_id="(\d+)"\s+author="([^\"]+)"
+[^>]+>\s*(.*?)\s*<\/message>/g);
+ my @msgs=($c=~/message\s+user_id="\d+"\s+author="([^\"]+)"\s+ti
+me="\d+"\s+message_id="(\d+)"[^>]+>\s*(.*?)\s*<\/message>/g);
+
while (@msgs) {
- my ($mid, $author, $msg)=(shift(@msgs),shift(@msgs),shift(@msg
+s));
+ my ($author, $mid, $msg)=(shift(@msgs),shift(@msgs),shift(@msg
+s));
# Remove html tags
$msg =~ s/<[^>]+?>//g;
# Decode html entities
diff -ur PerlMonksModules/PerlMonks/Users.pm PerlMonksModules.new/Perl
+Monks/Users.pm
--- PerlMonksModules/PerlMonks/Users.pm Mon Aug 19 12:39:56 2002
+++ PerlMonksModules.new/PerlMonks/Users.pm Sat Aug 24 01:16:15 20
+02
@@ -63,7 +63,7 @@
my $self=shift;
if ( (time() - $self->{cache_users_ts}) > USERS_REFRESH) {
if (my $c=$self->getpage(USERS_URL)) {
- my %users=($c=~/user\s+username="([^\"]+)"\s+user_id="(\d+)"/g)
+;
+ my %users=reverse ($c=~/user\s+user_id="(\d+)"\s+username="([^\
+"]+)"/g);
$self->{cache_users}=\%users;
$self->{cache_users_ts}=time();
}
How can I visualize my complex data structure?
|