{
    "content": [
        {
            "type": "text",
            "text": "# Net::LDAP::Control::VLV (perldoc)\n\n## NAME\n\nNet::LDAP::Control::VLV - LDAPv3 Virtual List View control object\n\n## SYNOPSIS\n\nuse Net::LDAP;\nuse Net::LDAP::Control::VLV;\nuse Net::LDAP::Constant qw( LDAPCONTROLVLVRESPONSE );\n$ldap = Net::LDAP->new( \"ldap.mydomain.eg\" );\n# Get the first 20 entries\n$vlv  = Net::LDAP::Control::VLV->new(\nbefore  => 0,        # No entries from before target entry\nafter   => 19,       # 19 entries after target entry\ncontent => 0,        # List size unknown\noffset  => 1,        # Target entry is the first\n);\n$sort = Net::LDAP::Control::Sort->new( order => 'cn' );\n@args = ( base     => \"o=Ace Industry, c=us\",\nscope    => \"subtree\",\nfilter   => \"(objectClass=inetOrgPerson)\",\ncallback => \\&processentry, # Call this sub for each entry\ncontrol  => [ $vlv, $sort ],\n);\n$mesg = $ldap->search( @args );\n# Get VLV response control\n($resp)  = $mesg->control( LDAPCONTROLVLVRESPONSE )  or die;\n$vlv->response( $resp );\n# Set the control to get the last 20 entries\n$vlv->end;\n$mesg = $ldap->search( @args );\n# Get VLV response control\n($resp)  = $mesg->control( LDAPCONTROLVLVRESPONSE )  or die;\n$vlv->response( $resp );\n# Now get the previous page\n$vlv->scrollpage( -1 );\n$mesg = $ldap->search( @args );\n# Get VLV response control\n($resp)  = $mesg->control( LDAPCONTROLVLVRESPONSE )  or die;\n$vlv->response( $resp );\n# Now page with first entry starting with \"B\" in the middle\n$vlv->before(9);       # Change page to show 9 before\n$vlv->after(10);       # Change page to show 10 after\n$vlv->assert(\"B\");     # assert \"B\"\n$mesg = $ldap->search( @args );\n\n## DESCRIPTION\n\n\"Net::LDAP::Control::VLV\" provides an interface for the creation and manipulation of objects\nthat represent the Virtual List View as described by draft-ietf-ldapext-ldapv3-vlv-09.txt.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **CONSTRUCTOR ARGUMENTS**\n- **SEE ALSO**\n- **AUTHOR**\n- **COPYRIGHT**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "Net::LDAP::Control::VLV",
        "section": "",
        "mode": "perldoc",
        "summary": "Net::LDAP::Control::VLV - LDAPv3 Virtual List View control object",
        "synopsis": "use Net::LDAP;\nuse Net::LDAP::Control::VLV;\nuse Net::LDAP::Constant qw( LDAPCONTROLVLVRESPONSE );\n$ldap = Net::LDAP->new( \"ldap.mydomain.eg\" );\n# Get the first 20 entries\n$vlv  = Net::LDAP::Control::VLV->new(\nbefore  => 0,        # No entries from before target entry\nafter   => 19,       # 19 entries after target entry\ncontent => 0,        # List size unknown\noffset  => 1,        # Target entry is the first\n);\n$sort = Net::LDAP::Control::Sort->new( order => 'cn' );\n@args = ( base     => \"o=Ace Industry, c=us\",\nscope    => \"subtree\",\nfilter   => \"(objectClass=inetOrgPerson)\",\ncallback => \\&processentry, # Call this sub for each entry\ncontrol  => [ $vlv, $sort ],\n);\n$mesg = $ldap->search( @args );\n# Get VLV response control\n($resp)  = $mesg->control( LDAPCONTROLVLVRESPONSE )  or die;\n$vlv->response( $resp );\n# Set the control to get the last 20 entries\n$vlv->end;\n$mesg = $ldap->search( @args );\n# Get VLV response control\n($resp)  = $mesg->control( LDAPCONTROLVLVRESPONSE )  or die;\n$vlv->response( $resp );\n# Now get the previous page\n$vlv->scrollpage( -1 );\n$mesg = $ldap->search( @args );\n# Get VLV response control\n($resp)  = $mesg->control( LDAPCONTROLVLVRESPONSE )  or die;\n$vlv->response( $resp );\n# Now page with first entry starting with \"B\" in the middle\n$vlv->before(9);       # Change page to show 9 before\n$vlv->after(10);       # Change page to show 10 after\n$vlv->assert(\"B\");     # assert \"B\"\n$mesg = $ldap->search( @args );",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 53,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "CONSTRUCTOR ARGUMENTS",
                "lines": 64,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 3,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "Net::LDAP::Control::VLV - LDAPv3 Virtual List View control object\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use Net::LDAP;\nuse Net::LDAP::Control::VLV;\nuse Net::LDAP::Constant qw( LDAPCONTROLVLVRESPONSE );\n\n$ldap = Net::LDAP->new( \"ldap.mydomain.eg\" );\n\n# Get the first 20 entries\n$vlv  = Net::LDAP::Control::VLV->new(\nbefore  => 0,        # No entries from before target entry\nafter   => 19,       # 19 entries after target entry\ncontent => 0,        # List size unknown\noffset  => 1,        # Target entry is the first\n);\n$sort = Net::LDAP::Control::Sort->new( order => 'cn' );\n\n@args = ( base     => \"o=Ace Industry, c=us\",\nscope    => \"subtree\",\nfilter   => \"(objectClass=inetOrgPerson)\",\ncallback => \\&processentry, # Call this sub for each entry\ncontrol  => [ $vlv, $sort ],\n);\n\n$mesg = $ldap->search( @args );\n\n# Get VLV response control\n($resp)  = $mesg->control( LDAPCONTROLVLVRESPONSE )  or die;\n$vlv->response( $resp );\n\n# Set the control to get the last 20 entries\n$vlv->end;\n\n$mesg = $ldap->search( @args );\n\n# Get VLV response control\n($resp)  = $mesg->control( LDAPCONTROLVLVRESPONSE )  or die;\n$vlv->response( $resp );\n\n# Now get the previous page\n$vlv->scrollpage( -1 );\n\n$mesg = $ldap->search( @args );\n\n# Get VLV response control\n($resp)  = $mesg->control( LDAPCONTROLVLVRESPONSE )  or die;\n$vlv->response( $resp );\n\n# Now page with first entry starting with \"B\" in the middle\n$vlv->before(9);       # Change page to show 9 before\n$vlv->after(10);       # Change page to show 10 after\n$vlv->assert(\"B\");     # assert \"B\"\n\n$mesg = $ldap->search( @args );\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "\"Net::LDAP::Control::VLV\" provides an interface for the creation and manipulation of objects\nthat represent the Virtual List View as described by draft-ietf-ldapext-ldapv3-vlv-09.txt.\n\nWhen using a Virtual List View control in a search, it must be accompanied by a sort control.\nSee Net::LDAP::Control::Sort\n",
                "subsections": []
            },
            "CONSTRUCTOR ARGUMENTS": {
                "content": "In addition to the constructor arguments described in Net::LDAP::Control the following are\nprovided.\n\nafter\nSet the number of entries the server should return from the list after the target entry.\n\nassert\nSet the assertion value user to locate the target entry. This value should be a legal value\nto compare with the first attribute in the sort control that is passed with the VLV control.\nThe target entry is the first entry in the list which is greater than or equal the assert\nvalue.\n\nbefore\nSet the number of entries the server should return from the list before the target entry.\n\ncontent\nSet the number of entries in the list. On the first search this value should be set to zero.\nOn subsequent searches it should be set to the length of the list, as returned by the server\nin the VLVResponse control.\n\ncontext\nSet the context identifier. On the first search this value should be set to zero. On\nsubsequent searches it should be set to the context value returned by the server in the\nVLVResponse control.\n\noffset\nSet the offset of the target entry.\n\nMETHODS\nAs 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\nThe \"offset\" and \"assert\" attributes are mutually exclusive. Setting one or the other will cause\nprevious values set by the other to be forgotten. The \"content\" attribute is also associated\nwith the \"offset\" attribute, so setting \"assert\" will cause any \"content\" value to be forgotten.\n\nend Set the target entry to the end of the list. This method will change the \"before\" and\n\"after\" attributes so that the target entry is the last in the page.\n\nresponse VLVRESPONSE\nSet the attributes in the control as per VLVRESPONSE. VLVRESPONSE should be a control of\ntype Net::LDAP::Control::VLVResponse returned from the server. \"response\" will populate the\n\"context\", \"offset\" and \"content\" attributes of the control with the values from\nVLVRESPONSE. Because this sets the \"offset\" attribute, any previous setting of the \"assert\"\nattribute will be forgotten.\n\nscroll NUM\nMove the target entry by NUM entries. A positive NUM will move the target entry towards the\nend of the list and a negative NUM will move the target entry towards the start of the list.\nReturns the index of the new target entry, or \"undef\" if the current target is identified by\nan assertion.\n\n\"scroll\" may change the \"before\" and \"after\" attributes if the scroll value would cause the\npage to go off either end of the list. But the page size will be maintained.\n\nscrollpage NUM\nScroll by NUM pages. This method simple calculates the current page size and calls \"scroll\"\nwith \"NUM * $pagesize\"\n\nstart\nSet the target entry to the start of the list. This method will change the \"before\" and\n\"after\" attributes to the target entry is the first entry in the page.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "Net::LDAP, Net::LDAP::Control, Net::LDAP::Control::Sort, 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) 2000-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": []
            }
        }
    }
}