diff options
Diffstat (limited to 'Plugin/Map.pm')
-rw-r--r-- | Plugin/Map.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Plugin/Map.pm b/Plugin/Map.pm index 3401f0f..c8708e2 100644 --- a/Plugin/Map.pm +++ b/Plugin/Map.pm @@ -24,10 +24,10 @@ sub map { return "Syntax: map command [item1, item2, ...]" unless $command and $subjects_raw; - my ($e, $from, $to, @subjects) = ListParser::parse_list($subjects_raw); - return $e if $e; + my $parsed = ListParser::parse_list($subjects_raw); + return $parsed->{error} if $parsed->{error}; - my @results = map { $run_command->("$command $_", $who, $where, $ided) } @subjects; + my @results = map { $run_command->("$command $_", $who, $where, $ided) } @{$parsed->{array}}; return "[" . (join ", ", @results). "]"; } 1; |