{
    "mode": "perldoc",
    "parameter": "Net::LDAP::Filter",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Net%3A%3ALDAP%3A%3AFilter/json",
    "generated": "2026-06-13T00:00:12Z",
    "synopsis": "use Net::LDAP::Filter;\n$filter = Net::LDAP::Filter->new( $filterstr );",
    "sections": {
        "NAME": {
            "content": "Net::LDAP::Filter - representation of LDAP filters\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "use Net::LDAP::Filter;\n\n$filter = Net::LDAP::Filter->new( $filterstr );\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "The Net::LDAP::Filter object lets you directly manipulate LDAP filters without worrying about\nthe string representation and all the associated escaping mechanisms.\n",
            "subsections": []
        },
        "CONSTRUCTOR": {
            "content": "new ( [ FILTER ] )\nCreate a new object. If FILTER is given, parse it.\n",
            "subsections": []
        },
        "METHODS": {
            "content": "parse ( FILTER )\nParse FILTER, updating the object to represent it.\n\nasstring\nReturn the filter in text form.\n\nprint ( [ FH ] )\nPrint the text representation of the filter to FH, or the currently selected output handle\nif FH is not given.\n\nnegate ( )\nLogically negate/invert the filter object so that it matches the opposite set of entries as\nthe original.\n\nInstead of simply negating the text form by surrounding it with the not operator, the\nnegation is done by recursively applying *De Morgan's law*.\n\nHere is an example:\n\n(|(&(cn=A)(cn=B))(|(!(cn=C))(cn=D)))\n\ngets negated to\n\n(&(|(!(cn=A))(!(cn=B)))(&(cn=C)(!(cn=D))))\n",
            "subsections": []
        },
        "FILTER SYNTAX": {
            "content": "Below is the syntax for a filter given in RFC 4515 http://www.ietf.org/rfc/rfc4515.txt\n\nfilter       = \"(\" filtercomp \")\"\nfiltercomp   = and / or / not / item\nand          = \"&\" filterlist\nor           = \"|\" filterlist\nnot          = \"!\" filter\nfilterlist   = 1*filter\nitem         = simple / present / substring / extensible\nsimple       = attr filtertype value\nfiltertype   = equal / approx / greater / less\nequal        = \"=\"\napprox       = \"~=\"\ngreater      = \">=\"\nless         = \"<=\"\nextensible   = attr [\":dn\"] [\":\" matchingrule] \":=\" value\n/ [\":dn\"] \":\" matchingrule \":=\" value\npresent      = attr \"=*\"\nsubstring    = attr \"=\" [initial] any [final]\ninitial      = value\nany          = \"*\" *(value \"*\")\nfinal        = value\nattr         = AttributeDescription from Section 4.1.4 of RFC 4511\nmatchingrule = MatchingRuleId from Section 4.1.8 of RFC 4511\nvalue        = AttributeValue from Section 4.1.5 of RFC 4511\n\n\nSpecial Character encodings\n---------------------------\n*               \\2a, \\*\n(               \\28, \\(\n)               \\29, \\)\n\\               \\5c, \\\\\nNUL             \\00\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "Net::LDAP, Other online documentation\n",
            "subsections": []
        },
        "ACKNOWLEDGEMENTS": {
            "content": "This document is based on a document originally written by Russell Fulton\n<r.fulton@auckland.ac.nz>.\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) 1997-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::Filter - representation of LDAP filters",
    "flags": [],
    "examples": [],
    "see_also": []
}