[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] I know I am going to feel foolish, but...



On Wed, Aug 18, 1999 at 10:06:16AM -0700, Elton Hughes wrote:
} This program used to work.
} 
} ----------
} #!/usr/bin/perl
} 
} use Net::POP3;
} 
} $username = 'galcantar';
} $password = 'gustavo';
} # $popserver = 'ftp.youthatwork.org';
} $popserver = 'dedmail.novapic.org';
} 
} open (POP3TEXT, '>>gamail.txt') or die "Cannot open email.txt : $!\n";
} 
} $| = 1; # Disable Buffering
} select($popserver);
} 
} $pop = Net::POP3->new($popserver)
}         or die "Can not open connection to $popserver : $!\n";
} 
} unless (defined $pop->pop($username, $password))  {

This is wrong.  You either use $pop->login($username,$password) or
$pop->apop($username,$password), depending on how the server wants you
to authenticate.  And apop is only in versions of Net::POP3 newer than
the one that comes with MacPerl.

}         $pop->quit;
}         die "Can not authenticate!\n";
} }
} 
} unless (defined ($messages = $pop->list))  {
}          $pop->quit;
}          die "Can not get list of undeleted messages!\n";
} }
} 
} $msgcount = scalar keys %$messages;
} 
} print POP3TEXT ("You have $msgcount messages.\n");
} 
} foreach $msgid (sort keys %$messages) {
}         $message = $pop->get($msgid);
}         unless (defined $message) {
}                 warn "could not fetch $msgid from server: $!\n";
}                 next;
}         }
}         print POP3TEXT ("\n\nMessage ID - $msgid\n");
}         print POP3TEXT (@$message);
} 
} 								$pop->delete($msgid);
} 
} }
} 
} $pop->quit;
} 
} ----------
} 
} Now I get this error message.
} 
} # Can't locate auto/Net/POP3/pop.al in @INC.
} File 'Appland:MacPerl Ÿ:lib:AutoLoader.pm'; Line 38
} 
} File 'Appland:MacPerl Ÿ:popread3.pl'; Line 18

Desperately looking for a method named "pop", it tries AutoLoader as a
last resort, and doesn't find what it's looking for.

} 
} ----------
} 
} What am I forgetting? I reformatted my hard drive crash a couple a months ago. I thought I installed all of the modules I had in MacPerl before. Net is in lib and POP3.pm is in net. I am a bit confused (and embarrassed) about this one.
} 
} Elton
} 
} 
} 
} ========================================================================= 
} NOVA Private Industry Council                 505 W. Olive Ave. Suite 550 
} Elton Hughes (Information Technology)                  Sunnyvale CA 94086 
} Phone: 408-730-7235                                     Fax: 408-730-7643 
} ------------------------------------------------------------------------- 
} 

-- 
Paul Schinder
schinder@pobox.com

===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org