{
    "mode": "perldoc",
    "parameter": "Net::LDAP::Control::SyncRequest",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Net%3A%3ALDAP%3A%3AControl%3A%3ASyncRequest/json",
    "generated": "2026-06-15T14:30:31Z",
    "synopsis": "use Net::LDAP;\nuse Net::LDAP::Control::SyncRequest;\nuse Net::LDAP::Constant qw(\nLDAPSYNCREFRESHONLY\nLDAPSYNCREFRESHANDPERSIST\nLDAPSUCCESS );\n$ldap = Net::LDAP->new( \"ldap.mydomain.eg\" );\n$req = Net::LDAP::Control::SyncRequest->new( mode => LDAPSYNCREFRESHONLY );\nmy $mesg = $ldap->search(base=> 'dc=mydomain,dc='eg',\nscope    => 'sub',\ncontrol  => [ $req ],\ncallback => \\&searchCallback, # call for each entry\nfilter   => \"(objectClass=*)\",\nattrs    => [ '*']);\nsub searchCallback {\nmy $message = shift;\nmy $entry = shift;\nmy @controls = $message->control;\nif ($controls[0]->isa('Net::LDAP::Control::SyncState')) {\nprint \"Received Sync State Control\\n\";\nprint $entry->dn().\"\\n\";\nprint 'State: '.$controls[0]->state.\"\\n\".', entryUUID: '.$controls[0]->entryUUID.', cookie: '.$controls[0]->cookie;\n} elsif ($controls[0]->isa('Net::LDAP::Control::SyncDone')) {\nprint \"Received Sync Done Control\\n\";\nprint 'Cookie: '.$controls[0]->cookie.', refreshDeletes: '.$controls[0]->refreshDeletes;\n}\n}",
    "sections": {
        "NAME": {
            "content": "Net::LDAP::Control::SyncRequest - LDAPv3 Sync Request control object\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "use Net::LDAP;\nuse Net::LDAP::Control::SyncRequest;\nuse Net::LDAP::Constant qw(\nLDAPSYNCREFRESHONLY\nLDAPSYNCREFRESHANDPERSIST\nLDAPSUCCESS );\n\n$ldap = Net::LDAP->new( \"ldap.mydomain.eg\" );\n\n$req = Net::LDAP::Control::SyncRequest->new( mode => LDAPSYNCREFRESHONLY );\nmy $mesg = $ldap->search(base=> 'dc=mydomain,dc='eg',\nscope    => 'sub',\ncontrol  => [ $req ],\ncallback => \\&searchCallback, # call for each entry\nfilter   => \"(objectClass=*)\",\nattrs    => [ '*']);\nsub searchCallback {\nmy $message = shift;\nmy $entry = shift;\nmy @controls = $message->control;\n\nif ($controls[0]->isa('Net::LDAP::Control::SyncState')) {\nprint \"Received Sync State Control\\n\";\nprint $entry->dn().\"\\n\";\nprint 'State: '.$controls[0]->state.\"\\n\".', entryUUID: '.$controls[0]->entryUUID.', cookie: '.$controls[0]->cookie;\n} elsif ($controls[0]->isa('Net::LDAP::Control::SyncDone')) {\nprint \"Received Sync Done Control\\n\";\nprint 'Cookie: '.$controls[0]->cookie.', refreshDeletes: '.$controls[0]->refreshDeletes;\n}\n}\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "\"Net::LDAP::Control::SyncRequest\" provides an interface for the creation and manipulation of\nobjects that represent the \"Sync Request Control\" as described by RFC 4533.\n",
            "subsections": []
        },
        "CONSTRUCTOR ARGUMENTS": {
            "content": "In addition to the constructor arguments described in Net::LDAP::Control the following are\nprovided.\n\nmode\ncookie\nreloadHint\n",
            "subsections": []
        },
        "METHODS": {
            "content": "As with Net::LDAP::Control each constructor argument described above is also available as a\nmethod on the object which will return the current value for the attribute if called without an\nargument, and set a new value for the attribute if called with an argument.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "Net::LDAP, Net::LDAP::Control, Net::LDAP::Control::SyncState, Net::LDAP::Control::SyncDone,\nhttp://www.ietf.org/rfc/rfc4533.txt\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Mathieu Parent <math.parent@gmail.com>\n\nPlease report any bugs, or post any suggestions, to the perl-ldap mailing list\n<perl-ldap@perl.org>\n",
            "subsections": []
        },
        "COPYRIGHT": {
            "content": "Copyright (c) 2008 Mathieu Parent. All rights reserved. This program is free software; you can\nredistribute it and/or modify it under the same terms as Perl itself.\n",
            "subsections": []
        }
    },
    "summary": "Net::LDAP::Control::SyncRequest - LDAPv3 Sync Request control object",
    "flags": [],
    "examples": [],
    "see_also": []
}