# HG changeset patch # User Peter Marschall # Date 1299348948 -3600 # Node ID cf8013cbfb58710d26ea655e92dcbb3e2654a1d1 # Parent d956658803b85351ddc3119a073cf4451f794d9e slight cleanup: make more clear, it's an array diff -r d956658803b8 -r cf8013cbfb58 shelldap --- a/shelldap Sat Mar 05 19:08:50 2011 +0100 +++ b/shelldap Sat Mar 05 19:15:48 2011 +0100 @@ -927,8 +927,7 @@ { my $self = shift; my $dn = shift; - my $attrs = \@_; - $attrs->[0] = '*' unless scalar @$attrs; + my @attrs = (@_) ? @_ : ('*'); unless ( $dn ) { print "No dn provided.\n"; @@ -944,7 +943,7 @@ $s = $self->search({ scope => 'one', vals => 1, - attrs => $attrs + attrs => \@attrs }); } elsif ( $dn =~ /\*/ ) { @@ -952,7 +951,7 @@ scope => 'one', vals => 1, filter => $dn, - attrs => $attrs + attrs => \@attrs }); } else { @@ -960,7 +959,7 @@ $s = $self->search({ base => $dn, vals => 1, - attrs => $attrs + attrs => \@attrs }); }