Hi Guys,
Sorry for asking something that's probably trivial; I'm trying to
pass an $entry to a series of functions that do some checking
and build an array for a modify operation as they go.
But for some reason I can't seem to access values.
if( $found_empNo == 1 ){
update_edir( $entry, $hrEmpNo );
throw_to_syslog("Found employeeNumber $empNo in eDir for
user $cn; checking to see whether data needs updating") if ( $debug
);
}
and update_edir:
sub update_edir{
my $entryptr=$_[0];
my $getem=$_[1];
my $newmesg;
my @newattrs;
# bless $entryptr, "Net::LDAP::Entry";
if(! defined $entryptr ){
return;
}
if(! defined $getem ){
return;
}
# testing for the 'interesting' fields from HR
chkPrfName( $entryptr, ${$hr{ "$getem" }}[3], [EMAIL PROTECTED] );
...
chkMngrPosID( $entryptr, ${$hr{ "$getem" }}[18], [EMAIL PROTECTED] );
}
And one of the other routines:
sub chkPrfName {
# my ( $entry, $field, $attrs ) = @_ ;
my $entry = $_[0];
my $field = $_[1];
my $attrs = $_[2];
if(! defined $field ){
return;
}
if( $field ne "" ){
print( "$entry->get_value( 'preferredName' ) $field\n" ) ;
}
And all I see with that print-statment is:
Net::LDAP::Entry=HASH(0x8a29160)->get_value( 'preferredName' )
How do I get to the actual value?
I did experiment with references, but that only gives me errors
that say the reference isn't blessed. If I bless it I get an error
saying that it's not a reference.
Cheers,
Andrej