{
    "mode": "perldoc",
    "parameter": "Net::LDAP::Schema",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Net%3A%3ALDAP%3A%3ASchema/json",
    "generated": "2026-10-08T14:02:59Z",
    "synopsis": "use Net::LDAP;\nuse Net::LDAP::Schema;\n#\n# Read schema from server\n#\n$ldap = Net::LDAP->new ( $server );\n$ldap->bind ( );\n$schema = $ldap->schema ( );\n#\n# Load from LDIF\n#\n$schema = Net::LDAP::Schema->new;\n$schema->parse ( \"schema.ldif\" ) or die $schema->error;",
    "sections": {
        "NAME": {
            "content": "Net::LDAP::Schema - Load and manipulate an LDAP v3 Schema\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "use Net::LDAP;\nuse Net::LDAP::Schema;\n\n#\n# Read schema from server\n#\n$ldap = Net::LDAP->new ( $server );\n$ldap->bind ( );\n$schema = $ldap->schema ( );\n\n#\n# Load from LDIF\n#\n$schema = Net::LDAP::Schema->new;\n$schema->parse ( \"schema.ldif\" ) or die $schema->error;\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "\"Net::LDAP::Schema\" provides a means to load an LDAP schema and query it for information\nregarding supported objectclasses, attributes and syntaxes.\n",
            "subsections": []
        },
        "METHODS": {
            "content": "Where a method is stated as taking the 'name or OID' of a schema item (which may be an object\nclass, attribute or syntax) then a case-insensitive name or raw OID (object identifier, in\ndotted numeric string form, e.g. 2.5.4.0) may be supplied.\n\nEach returned item of schema (e.g. an attribute definition) is returned in a HASH. The keys in\nthe returned HASH are lowercase versions of the keys read from the server. Here's a partial list\n(not all HASHes define all keys) although note that RFC 4512 permits other keys as well:\n\nname\ndesc\nobsolete\nsup\nequality\nordering\nsubstr\nsyntax\nsingle-value\ncollective\nno-user-modification\nusage\nabstract\nstructural\nauxiliary\nmust\nmay\napplies\naux\nnot\noc\nform\n\nallattributes ( )\nallditcontentrules ( )\nallditstructurerules ( )\nallmatchingrules ( )\nallmatchingruleuses ( )\nallnameforms ( )\nallobjectclasses ( )\nallsyntaxes ( )\nReturns a list of all the requested types in the schema.\n\nattribute ( NAME )\nditcontentrule ( NAME )\nditstructurerule ( NAME )\nmatchingrule ( NAME )\nmatchingruleuse ( NAME )\nnameform ( NAME )\nobjectclass ( NAME )\nsyntax ( NAME )\nReturns a reference to a hash, or \"undef\" if the schema item does not exist. \"NAME\" can be a\nname or an OID.\n\n$attrhref = $schema->attribute( \"attrname\" );\n\ndump ( )\nDump the raw schema information to standard out.\n\ndump ( FILENAME )\nDump the raw schema information to a file.\n\n$result = $schema->dump ( \"./schema.dump\" );\n\nIf no schema data is returned from directory server, the method will return undefined.\nOtherwise a value of 1 is always returned.\n\nerror ( )\nReturns the last error encountered when parsing the schema.\n\nmay ( OBJECTCLASS )\nGiven an argument which is the name or OID of a known object class, returns a list of HASHes\ndescribing the attributes which are optional in the class.\n\n@may = $schema->may ( $oc );\n# First optional attr has the name '$may[0]->{name}'\n\nmust ( OBJECTCLASS )\nGiven an argument which is the name or OID of a known object class, returns a list of HASHes\ndescribing the attributes which are mandatory in the class.\n\n@must = $schema->must ( $oc );\n\nparse ( MESG )\nparse ( ENTRY )\nparse ( FILENAME )\nTakes a single argument which can be any of, a message object returned from an LDAP search,\na \"Net::LDAP::Entry\" object or the name of a file containing an LDIF form of the schema.\n\nIf the argument is a message result from a search, \"Net::LDAP::Schema\" will parse the schema\nfrom the first entry returned.\n\nReturns true on success and \"undef\" on error.\n\nsuperclass ( NAME )\nGiven an argument which is the name or OID of a known objectclass, returns the list of names\nof the immediate superclasses.\n\nattributesyntax ( NAME )\nGiven an attribute name, return the actual syntax taking into account attribute supertypes.\n\nmatchingruleforattribute ( NAME, RULE )\nGiven an attribute name and a matching rule (\"equality\", \"substr\", etc), return the actual\nrule taking into account attribute supertypes.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "Net::LDAP, Net::LDAP::RFC\n",
            "subsections": []
        },
        "AUTHORS": {
            "content": "Graham Barr <gbarr@pobox.com> John Berthels <jjb@nexor.co.uk>\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) 1998-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": []
        }
    },
    "summary": "Net::LDAP::Schema - Load and manipulate an LDAP v3 Schema",
    "flags": [],
    "examples": [],
    "see_also": []
}