Net-LDAPxs
view release on metacpan or search on metacpan
ldap_result( ld, msgid, LDAP_MSG_ALL, NULL, &result );
ldap_parse_result( ld, result, &rc, &matched, &errmsg, &referrals, &resultctrls, 0 );
}else{ }
RETVAL = rc_exception(rc);
OUTPUT:
RETVAL
void
_unbind(ld)
LDAP* ld
PPCODE:
ldap_unbind_ext(ld, NULL, NULL);
void
_search(ld, opt)
LDAP *ld
HV *opt
PREINIT:
int rc;
SV** svp;
char **referrals;
LDAPControl *sortctrl = NULL;
LDAPControl *requestctrls[2];
LDAPControl **resultctrls = NULL;
LDAPSortKey **sortkeylist;
int msgid;
HV* search_result;
HV* stash;
SV* blessed_result;
PPCODE:
if ((svp = hv_fetch(opt, "base", 4, FALSE)) && SvPOK(*svp)) {
base = (char *)SvPV_nolen(*svp);
}else{
croak("_search(base): not a string");
}
if ((svp = hv_fetch(opt, "scope", 5, FALSE)) && SvIOK(*svp)) {
scope = SvIV(*svp);
}else{
croak("_search(scope): not a number");
}
fallback/const-xs.inc view on Meta::CPAN
dTARGET;
#endif
STRLEN len;
int type;
IV iv;
/* NV nv; Uncomment this if you need to return NVs */
/* const char *pv; Uncomment this if you need to return PVs */
INPUT:
SV * sv;
const char * s = SvPV(sv, len);
PPCODE:
/* Change this to constant(aTHX_ s, len, &iv, &nv);
if you need to return both NVs and IVs */
type = constant(aTHX_ s, len, &iv);
/* Return 1 or 2 items. First is error message, or undef if no error.
Second, if present, is found value */
switch (type) {
case PERL_constant_NOTFOUND:
sv =
sv_2mortal(newSVpvf("%s is not a valid Net::LDAPxs macro", s));
PUSHs(sv);
( run in 0.958 second using v1.01-cache-2.11-cpan-5511b514fd6 )