I'm getting this problem intermittenly i.e. it works for the first few runs, then it fails.
Getting this error:
Can't call method "entry" (or count etc) without a package or object reference at ... (the first entry call in the if test)
Odd.
eval
{
$mesg = $ldap->search (
base => "ou=my,dc=domain,dc=com",
filter => "(mail=$recipient)",
attrs => ['l']
) || undef $mesg;
You should not need that || undef $mesg
if(defined($mesg) && $mesg->entry(0))
$mesg will always be defined. You need to look at $mesg->code to determine if there was a problem.
But $mesg should always be an object reference, so calling ->entry should not fail.
I would suggest you add some more checking code to try to determine what $mesg holds when it does not hold an object reference.
Graham.
{ $My_Location = $mesg->entry(0)->get_value('l'); } else { $Unknown = 1; } };
if($@) { print "LDAP Error: [EMAIL PROTECTED]"; }
Why is this happening intermittently?
What am I doing wrong?
Is this a problem with the module itself?
My program is running as a daemon, and I need to restart to get it to work.
TIA, rotis23
__________________________________ Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard http://antispam.yahoo.com/whatsnewfree
