bcarnazzi has asked for the wisdom of the Perl Monks concerning the following question:

Dear Perl Monks,

I'm trying to build a gmail filsystem based on Fuse and GmailFS written in perl (most for learning purpose and fun !).

The Net::FS::Gmail module relies on Mail::Webmail::Gmail. Here is a sample session in pirl :

bcarnazzi@tuxbook ~ $ pirl Welcome to the Perl shell. Type ':help' for more information pirl @> use Net::FS::Gmail; @var = (); + pirl @> $fs=Net::FS::Gmail->new(username=>'bcarnazzi',password=>'xxx') +; @var = ( bless( { '_gmail' => bless( { '_proxy_enable' => 0, '_logged_in' => 1, '_proxy_user' => '', '_cookies' => { 'S' <CUTED> 'Mail::Webmail::Gmail' ), '_user' => 'bcarnazzi' }, 'Net::FS::Gmail' ) ); pirl @> $fs->store("test.csv"); @var = (); pirl @> $fs->files(); ERROR: Can't use an undefined value as an ARRAY reference at /usr/lib/ +perl5/site_perl/5.8.8/Net/FS/Gmail.pm line 149.

There is no related bugs in this CPAN module, so I guess the problem is about Mail::Webmail::Gmail.

When I try to use Mail::Webmail::Gmail, I can connect to my gmail account, but that's all. I can't retrieve any mail or anything. All module dependencies are satisfied and I can connect any www-site with HTTPS. While the module has not been updated since 2006, I feel this is a bug (need confirmation). Some of you meet the same trouble ?

What is the best way to handle this ? Should I open a ticket ? Propose a patch if I find the bug ? Where ?

Best regards,

Bruno.

Replies are listed 'Best First'.
Re: Problem with Mail::Webmail::Gmail CPAN module
by naChoZ (Curate) on Dec 18, 2007 at 15:10 UTC

    I noticed that particular module broke several months ago myself. It used to work, but eventually Google made some changes that seemed to render it incapable of any actual message handling. However, given the new gmail version is officially live, I'd say the last nail is in the coffin for that module.

    If it's really important to you, though, I'm pretty sure Fuse has an IMAPFS plugin. Be warned that the new IMAP interface for gmail is dreadfully slow, but I suspect that has to do with quantity of messages over size.

    --
    naChoZ

    Therapy is expensive. Popping bubble wrap is cheap. You choose.

Re: Problem with Mail::Webmail::Gmail CPAN module
by poolpi (Hermit) on Dec 18, 2007 at 14:38 UTC
    maybe the answer here
    <<The module is completely useless...>>

    update:
    i try this code
    use Mail::Webmail::Gmail; my $gmail = Mail::Webmail::Gmail->new( username => 'poolpi', password => 'passwd', ); my @labels = $gmail->get_labels(); my $messages = $gmail->get_messages( label => $labels[0] ); foreach ( @{ $messages } ) { if ( $_->{ 'new' } ) { print "Subject: " . $_->{ 'subject' } . " / Blurb: " . $_- +>{ 'blurb' } . "\n"; } }

    login OK but $gmail->get_labels() return -1 !!

    PooLpi