[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 # Copyright (c) 2008 Peter Marschall <peter@adpm.de>. All rights reserved. 2 # This program is free software; you can redistribute it and/or 3 # modify it under the same terms as Perl itself. 4 5 package Net::LDAP::Control::PostRead; 6 7 use vars qw(@ISA $VERSION); 8 use Net::LDAP::Control::PreRead; 9 10 @ISA = qw(Net::LDAP::Control::PreRead); 11 $VERSION = "0.01"; 12 13 1; 14 15 16 __END__ 17 18 =head1 NAME 19 20 Net::LDAP::Control::PostRead - LDAPv3 Post-Read control object 21 22 =head1 SYNOPSIS 23 24 use Net::LDAP; 25 use Net::LDAP::Control::PostRead; 26 use Net::LDAP::Constant qw( LDAP_CONTROL_POSTREAD LDAP_SUCCESS ); 27 28 $ldap = Net::LDAP->new( "ldap.mydomain.eg" ); 29 30 $postread = Net::LDAP::Control::Paged->new( attrs => [ qw/givenName/ ] ); 31 32 my $mesg = $ldap->modify( "cn=Barbara Jensen, o=University of Michigan, c=US", 33 replace => { givenName => "Babs" }, 34 control => $postread ); 35 36 if ($mesg->code eq LDAP_SUCCESS) { 37 my ($afterwards) = $mesg->control( LDAP_CONTROL_PREREAD ); 38 my $entry = $afterwards ? $afterwards->entry() : undef; 39 40 if ($entry) { 41 print "givenName changed to '" . 42 join("', '", $entry->get_value(givenName") . 43 "' to 'Babs'\n"); 44 } 45 } 46 47 48 =head1 DESCRIPTION 49 50 C<Net::LDAP::Control::PostRead> provides an interface for the creation and 51 manipulation of objects that represent the C<Post-Read Control> as described 52 by RFC 4527. 53 54 =head1 CONSTRUCTOR ARGUMENTS 55 56 In addition to the constructor arguments described in 57 L<Net::LDAP::Control> the following are provided. 58 59 =over 4 60 61 =item attrs => [ ATTR, ... ] 62 63 A list of attributes to be returned in the entry returned in the response control. 64 65 If absent, all attributes are returned. 66 67 Operational attributes may be included in the list by explicitely asking for them 68 or by using special C<"+"> feature (provided the server supports this feature). 69 70 =back 71 72 =head1 METHODS 73 74 As with L<Net::LDAP::Control> each constructor argument 75 described above is also avaliable as a method on the object which will 76 return the current value for the attribute if called without an argument, 77 and set a new value for the attribute if called with an argument. 78 79 In addition to these methods, the control also supports the following method: 80 81 =over 4 82 83 =item entry () 84 85 Returns the entry from the response control in the response message 86 to the LDAP request that contained the request control. 87 88 The result is either a Net::LDAP::Entry object or undefined. 89 90 =back 91 92 93 =head1 SEE ALSO 94 95 L<Net::LDAP>, 96 L<Net::LDAP::Control>, 97 http://www.ietf.org/rfc/rfc4527.txt 98 99 =head1 AUTHOR 100 101 Peter Marschall E<lt>peter@adpm.deE<gt> 102 103 Please report any bugs, or post any suggestions, to the perl-ldap mailing list 104 E<lt>perl-ldap@perl.orgE<gt> 105 106 =head1 COPYRIGHT 107 108 Copyright (c) 2008 Peter Marschall. All rights reserved. This program is 109 free software; you can redistribute it and/or modify it under the same 110 terms as Perl itself. 111 112 =cut 113
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Tue Mar 17 22:47:18 2015 | Cross-referenced by PHPXref 0.7.1 |