Add perlcritic tests and make code comply
[poe-component-irc-plugin-hello.git] / lib / POE / Component / IRC / Plugin / Hello.pm
index f559fd2e7be9fe000f9dc2b59789ca07d6611423..9b03e4713061d343b320b863887c80bfe2322e2e 100644 (file)
@@ -24,7 +24,7 @@ sub new {
                           saluton allo moin aloha namaste shalom ciào ciao servus
                           salve ave merhaba witaj hei hola selam sawubona
                           geodemorgen hoi καλημέρα/,
-                       "what's up", 'que tal', 'こんにちは', '你好', 'ni hao',
+                       'what\'s up', 'que tal', 'こんにちは', '你好', 'ni hao',
                        'добро јутро', 'γεια σας', 'bom dia', 'hyvää huomenta'],
                @_
        };
@@ -47,7 +47,7 @@ sub S_public{
        my $message = NFC decode 'UTF-8', $$rmessage;
        my @hello = @{$self->{greetings}};
 
-       my $match = first { $message =~ /^\s*(?:$mynick(?:)[:,])?\s*$_\s*[.!]?\s*$/i } @hello;
+       my $match = first { $message =~ /^\s*(?:$mynick(?:)[:,])?\s*$_\s*[.!]?\s*$/is } @hello;
        my $randhello = encode 'UTF-8', $hello[int rand $#hello];
        $irc->yield(privmsg => $$rchannels->[0] => "$randhello, $nick") if $match;
        PCI_EAT_NONE
This page took 0.010169 seconds and 4 git commands to generate.