Unix Programming - Perl Mail::Box

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > September 2006 > Perl Mail::Box





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Perl Mail::Box
jackley.cesar@gmail.com

2006-09-24, 1:35 am

I tried to use Mail::Box in PERL to open a
maillbox(/var/spool/mail/root) and process the messages but I keep
having this error:
Can't call method "open" on an undefined value at (eval
32)[/usr/lib/perl5/5.8.6/perl5db.pl:628] line 2.

The code is :
use Mail::Box::Manager;
my $mailspool = "/var/spool/mail/root";
my $mgr = Mail::Box::Manager->new;
my $folder = $mgr->open(folder => $mailspool);



Any help would be appreciated.

Thank you !

joe@invalid.address

2006-09-24, 7:41 pm

jackley.cesar@gmail.com writes:

> I tried to use Mail::Box in PERL to open a
> maillbox(/var/spool/mail/root) and process the messages but I keep
> having this error:
> Can't call method "open" on an undefined value at (eval
> 32)[/usr/lib/perl5/5.8.6/perl5db.pl:628] line 2.
>
> The code is :
> use Mail::Box::Manager;
> my $mailspool = "/var/spool/mail/root";
> my $mgr = Mail::Box::Manager->new;
> my $folder = $mgr->open(folder => $mailspool);


The error message is saying that $mgr isn't defined, so it sounds like
the constructor failed. What does the module documentation say
about creating an object?

Joe

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com