Allow msg() non-matches to sometimes be non-fatal.
authorGreg Sabino Mullane <[email protected]>
Tue, 21 Jun 2011 11:22:30 +0000 (07:22 -0400)
committerGreg Sabino Mullane <[email protected]>
Tue, 21 Jun 2011 11:22:30 +0000 (07:22 -0400)
check_postgres.pl

index b4f09ce7d30ee41bbe5128f1e277cd9aea1e61b7..403e7eefaa47eba555754a9274fbcf54e3a58ee5 100755 (executable)
@@ -1078,6 +1078,8 @@ sub msg { ## no critic
         $msg = $msg{'en'}{$name};
     }
     else {
+        ## Allow for non-matches in certain rare cases
+        return '' if $opt{nomsgok};
         my $line = (caller)[2];
         die qq{Invalid message "$name" from line $line\n};
     }