| Gtk2-Net-LDAP-Widgets documentation | Contained in the Gtk2-Net-LDAP-Widgets distribution. |
Gtk2::Net::LDAP::Widgets::Util - helper functions
This module contains various helper functions and isn't meant to be used
directly. Read the source in case of any needs to do that.
Trims superfluous outside parentheses from an LDAP filter, e.g. ((uid=olo)) will be changed to uid=olo
filter string representation of LDAP filter to trim parentheses from.
Aleksander Adamowski, <cpan@olo.org.pl>
Copyright 2005,2008 by Aleksander Adamowski
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
| Gtk2-Net-LDAP-Widgets documentation | Contained in the Gtk2-Net-LDAP-Widgets distribution. |
package Gtk2::Net::LDAP::Widgets::Util; #---[ pod head ]---{{{
#---}}} require Exporter; our @ISA = qw(Exporter); our @EXPORT = qw(filter_trim_outer_parens); our $VERSION = "2.0.1"; use strict 'vars'; #---[ sub filter_trim_outer_parens ]---{{{
sub filter_trim_outer_parens { my $filter = shift; while ($filter =~ /^\(.*\)$/) { $filter =~ s/^\((.*)\)$/$1/; } return $filter; } #---}}} 1; __END__ #---[ pod end ]---{{{
#---}}}