mirror of
https://github.com/duncs/clusterssh.git
synced 2025-07-03 01:43:25 +00:00
Fixed the default cluster not being opened
This was due to a method being called in scalar context, which returned incorrect detail Reported by Aaron C. de Bruyn
This commit is contained in:
parent
e825bc17ca
commit
583c8bbe53
5 changed files with 56 additions and 7 deletions
|
@ -161,7 +161,10 @@ sub get_tag {
|
|||
join( ' ', sort @{ $self->{tags}->{$tag} } )
|
||||
);
|
||||
|
||||
return sort @{ $self->{tags}->{$tag} };
|
||||
return
|
||||
wantarray
|
||||
? sort @{ $self->{tags}->{$tag} }
|
||||
: scalar @{ $self->{tags}->{$tag} };
|
||||
}
|
||||
|
||||
$self->debug( 2, "Tag $tag is not registered" );
|
||||
|
@ -240,7 +243,10 @@ Register the given host on the provided tags.
|
|||
|
||||
=item @entries = $cluster->get_tag('tag');
|
||||
|
||||
Retrieve all entries for the given tag
|
||||
=item $entries = $cluster->get_tag('tag');
|
||||
|
||||
Retrieve all entries for the given tag. Returns an array of hosts or
|
||||
the number of hosts in the array depending on context.
|
||||
|
||||
=item @tags = $cluster->list_tags();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue