From cd1fc57841deab0e9b8bcfad49d527c6b263534c Mon Sep 17 00:00:00 2001 From: David Phillips Date: Tue, 10 Apr 2018 15:20:24 +1200 Subject: Correct capitalisation on module names --- plugin/map.pm | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 plugin/map.pm (limited to 'plugin/map.pm') diff --git a/plugin/map.pm b/plugin/map.pm deleted file mode 100644 index f8cb256..0000000 --- a/plugin/map.pm +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env perl - -package plugin::map; - -use strict; -use warnings; - -my %config; -my $run_command; - - -sub configure { - my $self = shift; - my $cmdref = shift; - my $cref = shift; - %config = %$cref; - $run_command = shift; - - $cmdref->("map", sub { $self->map(@_); } ); - - return $self; -} - -sub map { - my ($self, $logger, $who, $where, $rest, @arguments) = @_; - my ($command, $subjects) = ($rest =~ /^(.+?)\s+(.*)$/); - - return "[]" unless $subjects; - - my @array = map { $run_command->("$command $_", $who, $where) } (split /,/, $subjects); - - return "[" . (join ", ", @array). "]"; -} -1; -- cgit v1.1