[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 # Copyright (c) 2000-2004 Graham Barr <gbarr@pobox.com>. 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::Extra; 6 7 use strict; 8 use vars qw($VERSION); 9 10 require Net::LDAP; 11 require Carp; 12 13 $VERSION = "0.01"; 14 15 sub import { 16 shift; 17 local $SIG{__DIE__} = \&Carp::croak; 18 foreach (@_) { 19 my $file = "Net/LDAP/Extra/$_.pm"; 20 next if exists $INC{$file}; 21 require $file; 22 "Net::LDAP::Extra::$_"->import; 23 } 24 } 25 26 1; 27 28 __END__ 29 30 31 =head1 NAME 32 33 Net::LDAP::Extra -- Load extra Net::LDAP methods 34 35 =head1 SYNOPSIS 36 37 use Net::LDAP::Extra qw(my_extn); 38 39 $ldap = Net::LDAP->new( ... ); 40 41 $ldap->my_extn( ... ); 42 43 =head1 DESCRIPTION 44 45 C<Net::LDAP::Extra> allows extra methods to be added to Net::LDAP. 46 Normally such methods would be added by sub-classing Net::LDAP, but this 47 proves to get messy as different people write different additions and 48 others want to use multiple of these sub-classes. Users end up having 49 to create sub-classes of their own which inherit from all the extension 50 sub-classes just so they can get all the features. 51 52 C<Net::LDAP::Extra> allows methods to be added directly to 53 all Net::LDAP objects. This can be done by creating a class 54 C<Net::LDAP::Extra::name> which exports functions. A 55 C<use Net::LDAP::Extra qw(name)> will then make these functions avaliable 56 as a methods on all C<Net::LDAP> objects. 57 58 Care should be taken when choosing names for the functions to export 59 to ensure that they do not clash with others. 60 61 =cut 62
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 |