This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Re: $whoami calculation in Sys::Syslog.pm should not be greedy
[perl5.git] / lib / Sys / Syslog.pm
index ee90127..2da1d76 100644 (file)
@@ -154,7 +154,7 @@ sub syslog {
 
     $whoami = $ident;
 
-    if (!$ident && $mask =~ /^(\S.*):\s?(.*)/) {
+    if (!$whoami && $mask =~ /^(\S.*?):\s?(.*)/) {
        $whoami = $1;
        $mask = $2;
     }