# HG changeset patch # User Mahlon E. Smith # Date 1315350331 25200 # Node ID 40c3719c87d416a879db39242a4979e9fef63d1e # Parent 057fefab56b040aa8e6242fddfefb5607b90fed1 fix 'ls -R' output, minor style cleanup diff -r 057fefab56b0 -r 40c3719c87d4 shelldap --- a/shelldap Tue Sep 06 16:03:31 2011 -0700 +++ b/shelldap Tue Sep 06 16:05:31 2011 -0700 @@ -288,7 +288,6 @@ ls -l ls -lR uid=mahlon list uid=m* - list verbose In 'verbose' mode, descriptions are listed as well, if they exist. There are also some 'sane' long listings for common objectClass types. @@ -813,15 +812,16 @@ # check whether a given string may be a filter # Synopsis: $yesNo = $self->is_valid_filter($string); +# sub is_valid_filter { - my $self = shift; + my $self = shift; my $filter = shift or return; - my $filterObject = Net::LDAP::Filter->new($filter); - return $filterObject ? 1 : 0 + return Net::LDAP::Filter->new( $filter ) ? 1 : 0; } + # little. yellow. different. better. # sub debug @@ -1429,44 +1429,42 @@ sub run_list { - my $self = shift; - my @args = @_; - my $base = $self->base(); + my $self = shift; + my @args = @_; my @attrs = (); - my $flags = ''; - my $filter = '(objectclass=*)'; + my $filter; + + # flag booleans + my ( $recurse, $long ); # parse arguments: [