From dcbcabb056420dc634cbcf28b74780537b727540 Mon Sep 17 00:00:00 2001 From: "peter@adpm.de" Date: Sat, 5 Mar 2011 18:15:48 +0000 Subject: [PATCH] slight cleanup: make more clear, it's an array FossilOrigin-Name: 1f29b4d694f8e86100debed943738e7babce5c1ed6062818ea110bef5cd130eb --- shelldap | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/shelldap b/shelldap index 86ea6b6..3c88f99 100755 --- a/shelldap +++ b/shelldap @@ -927,8 +927,7 @@ sub run_cat { 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 @@ sub run_cat $s = $self->search({ scope => 'one', vals => 1, - attrs => $attrs + attrs => \@attrs }); } elsif ( $dn =~ /\*/ ) { @@ -952,7 +951,7 @@ sub run_cat scope => 'one', vals => 1, filter => $dn, - attrs => $attrs + attrs => \@attrs }); } else { @@ -960,7 +959,7 @@ sub run_cat $s = $self->search({ base => $dn, vals => 1, - attrs => $attrs + attrs => \@attrs }); }