Re: Dumping Net::LDAP::Entry to a string
Christopher Bongaarts <[email protected]>
| Newsgroups | gmane.comp.lang.perl.modules.ldap |
|---|---|
| Organization | University of Minnesota |
| Message-ID | <[email protected]> |
Graham Barr wrote: > On Feb 10, 2010, at 9:35 AM, Christopher Bongaarts wrote: >> Graham Barr wrote: >> >>> Also, anything that can dump to a filehandle can dump to a string. >>> open(my $fh,">",\my $buffer); >>> then pass $fh as the file handle >> Only in perl >= 5.8. Perl 5.6 and earlier won't support this syntax, so I would advise against using this to implement and ldif() method unless you are OK with breaking compatibility with older perls... > > 5.8.0 was released nearly 8 years ago. Anyone who is still using a version of perl that old will not mind using an old version of Net::LDAP IMO. It doesn't present any syntactic difficulties for old perls (it will compile and execute the statement; it just won't store or read any data), so perhaps having a runtime version check that carps an appropriate warning would be appropriate. -- %% Christopher A. Bongaarts %% [email protected] %% %% OIT - Identity Management %% http://umn.edu/~cab %% %% University of Minnesota %% +1 (612) 625-1809 %%