CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
Can't call method "rows" on an undefined value at C:/Perl/site/lib/HTML/TableExtract.pm line 224

 



zatlas1
Novice

May 13, 2010, 9:44 PM

Post #1 of 3 (1385 views)
Can't call method "rows" on an undefined value at C:/Perl/site/lib/HTML/TableExtract.pm line 224 Can't Post

I am trying to look at me yahoo email and I do the code bellow. Forget about the regex within the internal foreach, I never get there. The programs dies at the statement:
@flist = $y-> folder_list( );
with the message:
Can't call method "rows" on an undefined value at C:/Perl/site/lib/HTML/TableExtract.pm line 224

Help, what am I doing wrong in that simple logic?



Code
  use Mail::Client::Yahoo; 

$y = Mail::Client::Yahoo->login
(
username => 'user',
password => 'password',
secure => 0, # 1 is for the paranoid and patient
);
@flist = $y-> folder_list( );

foreach $folder(@flist)
{
$y->select_folder($folder);

@ids = $y->message_list();
foreach $id(@ids)
{

$message = $y->message($id);
while ($message =~ m/(\"(.+)\"\s\<(\S+@\S+)\>)|(\<(\S+@\S+)\>)/g)
{
print $2, ";", $3, ";", $5, "\n";
last;
}
last;
}
last;
#}
$y->logout();



Bianca
User

Jun 4, 2010, 6:16 AM

Post #2 of 3 (1249 views)
Re: [zatlas1] Can't call method "rows" on an undefined value at C:/Perl/site/lib/HTML/TableExtract.pm line 224 [In reply to] Can't Post

Hi!
I think Mail::Client::Yahoo works like screenscraping because it needs WWW::Mechanize and HTML::TableExtract.
And if Yahoo changes the weblayout, the content can not even readed by the module.

Perhaps you can contact the author of module: http://search.cpan.org/~johnsca/MailClientYahoo-1.0/lib/Mail/Client/Yahoo.pm


zatlas1
Novice

Jun 4, 2010, 7:12 AM

Post #3 of 3 (1246 views)
Re: [Bianca] Can't call method "rows" on an undefined value at C:/Perl/site/lib/HTML/TableExtract.pm line 224 [In reply to] Can't Post

Thanks... this is unfortunately true.
I resorted to get yahoo plus ($19 annually) and use local folder on thunderbird mail client.
ZA

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives