in reply to use (of) Net::POP3

Yes vek i agree with you. So i've check if
$pop->login ($user,$pass);
it returns true or false and it returns false. The error i get is
Could not login as root with something Use of uninitialized value in numeric eq (==) at /usr/lib/perl5/5.8.0/ +Net/POP3.pm line 301. Use of uninitialized value in numeric eq (==) at /usr/lib/perl5/5.8.0/ +Net/POP3.pm line 302.

is this my fault (again) or is it some kind of bug (i don't think so but..)!?
Atnonis!

Replies are listed 'Best First'.
Re: Re: use (of) Net::POP3
by Tomte (Priest) on Jun 21, 2003 at 21:40 UTC

    Looking at the linenumbers, there is a version mismatch between your module and mine :-)

    Nevertheless, the lines in question are almost certainly:

    sub _USER { shift->command('USER',$_[0])->response() == CMD_OK } sub _PASS { shift->command('PASS',$_[0])->response() == CMD_OK }
    shift->command() returns the object itself, calling response() to fetch the , well, response.

    Looking at Net::Cmd::response() shows, that it will return undef if the response from the server can't be parsed.
    I would manualy play through the commands via telnet server 110 to see what's going on, and have a deeper look at POP3.pm and Cmd.pm than my quick glance now.

    regards,
    tomte


    Hlade's Law:

    If you have a difficult task, give it to a lazy person --
    they will find an easier way to do it.

      You can also turn on debugging in Net::POP3 by adding it after the server in new:

      my $pop = Net::POP3->new($mailserver, Debug => 1);

      That should get it to show you whats going on behind the scenes as the script runs.