Gtk2::Net::LDAP::Widgets::Util - helper functions


Gtk2-Net-LDAP-Widgets documentation Contained in the Gtk2-Net-LDAP-Widgets distribution.

Index


Code Index:

NAME

Top

Gtk2::Net::LDAP::Widgets::Util - helper functions

SYNOPSIS

Top

    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.

filter_trim_outer_parens

filter_trim_outer_parens ( filter )

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.

SEE ALSO

Top

Gtk2::Net::LDAP::Widgets Gtk2 Net::LDAP

AUTHOR

Top

Aleksander Adamowski, <cpan@olo.org.pl>

COPYRIGHT AND LICENSE

Top


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 ]---{{{

#---}}}