[perl-www-contact commit] r46 - trunk/lib/WWW/Contact

0 views
Skip to first unread message

codesite...@google.com

unread,
Nov 1, 2008, 9:16:03 AM11/1/08
to perl-www...@googlegroups.com
Author: sachinjsk
Date: Sat Nov 1 06:15:56 2008
New Revision: 46

Modified:
trunk/lib/WWW/Contact/Gmail.pm

Log:
Bug fix - Make sure that we are searching with the right <td></td> for
email. Code was breaking for cases where a fancy name had '@' inside it.
eg: @rjun (Fancy was of writting Arjun).

Modified: trunk/lib/WWW/Contact/Gmail.pm
==============================================================================
--- trunk/lib/WWW/Contact/Gmail.pm (original)
+++ trunk/lib/WWW/Contact/Gmail.pm Sat Nov 1 06:15:56 2008
@@ -72,10 +72,12 @@
}
}
if ($start) {
- my $text = $token->as_is;
- if ($text =~ /(\S+\@\S+)/) {
- push @emails, $1;
- }
+ if( $token->is_start_tag('td') ) {
+ my $text = $p->peek(2);
+ if ($text =~ /(\S+\@\S+)/) {
+ push @emails, $1;
+ }
+ }
}
}

Reply all
Reply to author
Forward
0 new messages