# Net::LDAP::Control::Subentries - LDAPv3 Subentries control object - perldoc - [phpMan]

## NAME
    [Net::LDAP::Control::Subentries](https://www.chedong.com/phpMan.php/perldoc/Net%3A%3ALDAP%3A%3AControl%3A%3ASubentries/markdown) - LDAPv3 Subentries control object

## SYNOPSIS
     use [Net::LDAP](https://www.chedong.com/phpMan.php/perldoc/Net%3A%3ALDAP/markdown);
     use [Net::LDAP::Control::Subentries](https://www.chedong.com/phpMan.php/perldoc/Net%3A%3ALDAP%3A%3AControl%3A%3ASubentries/markdown);

     $ldap = [Net::LDAP](https://www.chedong.com/phpMan.php/perldoc/Net%3A%3ALDAP/markdown)->new( "ldap.mydomain.eg" );

     $subentries = [Net::LDAP::Control::Subentries](https://www.chedong.com/phpMan.php/perldoc/Net%3A%3ALDAP%3A%3AControl%3A%3ASubentries/markdown)->new( visibility => 1 );

     $msg = $ldap->search( base => 'dc=sub,dc=mydomain,dc=eg",
                           filter => '(objectclass=*)',
                           attrs => [ qw/1.1/ ],
                           control => [ $subentries ] );

     die "error: ",$msg->code(),": ",$msg->error()  if ($msg->code());

## DESCRIPTION
    "[Net::LDAP::Control::Subentries](https://www.chedong.com/phpMan.php/perldoc/Net%3A%3ALDAP%3A%3AControl%3A%3ASubentries/markdown)" provides an interface for the creation and manipulation of
    objects that represent the "Subentries" control as described by RFC 3672.

    This control, for which no corresponding response control exists, is appropriate for LDAP search
    operations only.

    In absence of this control, subentries are visible only to LDAP search requests with "scope =>
    'base'", but not to searches with any other "scope" value.

## CONSTRUCTOR ARGUMENTS
    In addition to the constructor arguments described in [Net::LDAP::Control](https://www.chedong.com/phpMan.php/perldoc/Net%3A%3ALDAP%3A%3AControl/markdown) the following are
    provided:

    visibility
        A Boolean value indicating the visibility of subentries or regular entries.

        The value "TRUE" indicates that subentries are visible and normal entries are not; the value
        "FALSE" indicates that normal entries are visible and subentries are not.

## METHODS
    As with [Net::LDAP::Control](https://www.chedong.com/phpMan.php/perldoc/Net%3A%3ALDAP%3A%3AControl/markdown) each constructor argument described above is also available as a
    method on the object which will return the current value for the attribute if called without an
    argument, and set a new value for the attribute if called with an argument.

## SEE ALSO
    [Net::LDAP](https://www.chedong.com/phpMan.php/perldoc/Net%3A%3ALDAP/markdown), [Net::LDAP::Control](https://www.chedong.com/phpMan.php/perldoc/Net%3A%3ALDAP%3A%3AControl/markdown),

## AUTHOR
    Peter Marschall <<peter@adpm.de>>.

    Please report any bugs, or post any suggestions, to the perl-ldap mailing list
    <<perl-ldap@perl.org>>

## COPYRIGHT
    Copyright (c) 2020 Peter Marschall. All rights reserved. This program is free software; you can
    redistribute it and/or modify it under the same terms as Perl itself.

