{
    "content": [
        {
            "type": "text",
            "text": "# Net::LDAP::Control (perldoc)\n\n## NAME\n\nNet::LDAP::Control - LDAPv3 control object base class\n\n## SYNOPSIS\n\nuse Net::LDAP::Control;\nuse Net::LDAP::Constant qw( LDAPCONTROLMANAGEDSAIT );\nmy $reqctrl1 = Net::LDAP::Control->new( type => LDAPCONTROLMANAGEDSAIT );\nmy $reqctrl2 = Net::LDAP::Control->new(\ntype     => \"1.2.3.4\",\nvalue    => \"help\",\ncritical => 0\n);\n$mesg = $ldap->search( @args, control => [ $reqctrl1, $reqctrl2 ]);\nmy @resctrls = $mesg->control();\n\n## DESCRIPTION\n\n\"Net::LDAP::Control\" is the base-class for LDAPv3 control objects.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **CONSTRUCTORS**\n- **METHODS**\n- **SEE ALSO**\n- **AUTHOR**\n- **COPYRIGHT**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "Net::LDAP::Control",
        "section": "",
        "mode": "perldoc",
        "summary": "Net::LDAP::Control - LDAPv3 control object base class",
        "synopsis": "use Net::LDAP::Control;\nuse Net::LDAP::Constant qw( LDAPCONTROLMANAGEDSAIT );\nmy $reqctrl1 = Net::LDAP::Control->new( type => LDAPCONTROLMANAGEDSAIT );\nmy $reqctrl2 = Net::LDAP::Control->new(\ntype     => \"1.2.3.4\",\nvalue    => \"help\",\ncritical => 0\n);\n$mesg = $ldap->search( @args, control => [ $reqctrl1, $reqctrl2 ]);\nmy @resctrls = $mesg->control();",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 14,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 13,
                "subsections": []
            },
            {
                "name": "CONSTRUCTORS",
                "lines": 37,
                "subsections": []
            },
            {
                "name": "METHODS",
                "lines": 40,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 9,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 3,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "Net::LDAP::Control - LDAPv3 control object base class\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use Net::LDAP::Control;\nuse Net::LDAP::Constant qw( LDAPCONTROLMANAGEDSAIT );\n\nmy $reqctrl1 = Net::LDAP::Control->new( type => LDAPCONTROLMANAGEDSAIT );\nmy $reqctrl2 = Net::LDAP::Control->new(\ntype     => \"1.2.3.4\",\nvalue    => \"help\",\ncritical => 0\n);\n\n$mesg = $ldap->search( @args, control => [ $reqctrl1, $reqctrl2 ]);\n\nmy @resctrls = $mesg->control();\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "\"Net::LDAP::Control\" is the base-class for LDAPv3 control objects.\n\nControls provide a mechanism that allows one to extend the semantics and arguments of LDAP\noperations. Controls may be attached to LDAP operations, and only affect the semantics of the\noperation they are attached to.\n\nControls sent by clients are termed *request controls*, and are set using the \"control\" option\nof the respective LDAP operations. Controls sent by servers are called *response controls*, they\ncan be found using the \"control()\" method of the response message objects.\n\nServers announce the controls they support in the attribute \"supportedControls\" in their\nRootDSE.\n",
                "subsections": []
            },
            "CONSTRUCTORS": {
                "content": "new ( ARGS )\nARGS is a list of name/value pairs, valid arguments are:\n\ncritical\nA Boolean value, if TRUE and the control is unrecognized by the server or is\ninappropriate for the requested operation then the server will return an error and the\noperation will not be performed.\n\nIf FALSE and the control is unrecognized by the server or is inappropriate for the\nrequested operation then the server will ignore the control and perform the requested\noperation as if the control was not given.\n\nIf absent, FALSE is assumed.\n\ntype\nA dotted-decimal representation of an OBJECT IDENTIFIER which uniquely identifies the\ncontrol. This prevents conflicts between control names.\n\nThis may be omitted if the constructor is being called on a sub-class of\nNet::LDAP::Control which has registered to be associated with an OID. If the constructor\nis being called on the Net::LDAP::Control package, then this argument must be given. If\nthe given OID has been registered by a package, then the returned object will be of the\ntype registered to handle that OID.\n\nvalue\nOptional information associated with the control. Its format is specific to the\nparticular control.\n\nfromasn ( ASN )\nASN is a HASH reference, normally extracted from a PDU. It will contain a \"type\" element and\noptionally \"critical\" and \"value\" elements. On return ASN will be blessed into a package. If\n\"type\" is a registered OID, then ASN will be blessed into the registered package, if not\nthen ASN will be blessed into Net::LDAP::Control.\n\nThis constructor is used internally by Net::LDAP and assumes that HASH passed contains a\nvalid control. It should be used with caution.\n",
                "subsections": []
            },
            "METHODS": {
                "content": "In addition to the methods listed below, each of the named parameters to \"new\" is also available\nas a method. \"type\" will return the OID of the control object. \"value\" and \"critical\" are\nset/get methods and will return the current value for each attribute if called without\narguments, but may also be called with arguments to set new values.\n\nerror ()\nIf there has been an error returns a description of the error, otherwise it will return\n\"undef\"\n\ninit ()\n\"init\" will be called as the last step in both constructors. What it does will depend on the\nsub-class. It must always return the object.\n\nregister ( OID )\n\"register\" is provided for sub-class implementors. It should be called as a class method on\na sub-class of Net::LDAP::Control with the OID that the class will handle.\nNet::LDAP::Control will remember this class and OID pair and use it in the following\nsituations.\n\n*   \"new\" is called as a class method on the Net::LDAP::Control package and OID is passed as\nthe type. The returned object will be blessed into the package that registered the OID.\n\n*   \"new\" is called as a class method on a registered package and the \"type\" is not\nspecified. The \"type\" will be set to the OID registered by that package.\n\n*   \"fromasn\" is called to construct an object from ASN. The returned object will be\nblessed into the package which was registered to handle the OID in the ASN.\n\n( toasn )\nReturns a structure suitable for passing to Convert::ASN1 for encoding. This method will be\ncalled by Net::LDAP when the control is used.\n\nThe base class implementation of this method will call the \"value\" method without arguments\nto allow a sub-class to encode it's value. Sub-classes should not need to override this\nmethod.\n\nvalid ()\nReturns true if the object is valid and can be encoded. The default implementation for this\nmethod is to return TRUE if there is no error, but sub-classes may override that.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "Net::LDAP, Net::LDAP::RootDSE, Net::LDAP::Control::Assertion, Net::LDAP::Control::DontUseCopy,\nNet::LDAP::Control::EntryChange, Net::LDAP::Control::ManageDsaIT,\nNet::LDAP::Control::MatchedValues, Net::LDAP::Control::Paged,\nNet::LDAP::Control::PasswordPolicy, Net::LDAP::Control::PersistentSearch,\nNet::LDAP::Control::PostRead, Net::LDAP::Control::PreRead, Net::LDAP::Control::ProxyAuth,\nNet::LDAP::Control::Relax, Net::LDAP::Control::Sort, Net::LDAP::Control::SortResult,\nNet::LDAP::Control::SyncDone, Net::LDAP::Control::SyncRequest, Net::LDAP::Control::SyncState,\nNet::LDAP::Control::TreeDelete, Net::LDAP::Control::VLV, Net::LDAP::Control::VLVResponse\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Graham Barr <gbarr@pobox.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) 1999-2004 Graham Barr. 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": []
            }
        }
    }
}