George S. Baugh 3 rokov pred
rodič
commit
efab9021a8
3 zmenil súbory, kde vykonal 16 pridanie a 2 odobranie
  1. 4 0
      Changes
  2. 1 0
      dist.ini
  3. 11 2
      lib/Audit/Log.pm

+ 4 - 0
Changes

@@ -0,0 +1,4 @@
+Revision history for Audit::Log
+
+0.001 2022-01-18 TEODESIAN
+    - First release to CPAN

+ 1 - 0
dist.ini

@@ -41,6 +41,7 @@ except = \.travis.yml
 [Manifest]
 
 [PkgVersion]
+use_package=1
 [AutoPrereqs]
 [MetaProvides::Package]
 

+ 11 - 2
lib/Audit/Log.pm

@@ -3,7 +3,10 @@ package Audit::Log;
 use strict;
 use warnings;
 
-# ABSTRACT: auditd log parser with no external dependencies, using no perl features past 5.8
+use 5.006;
+use v5.12.0;    # Before 5.006, v5.10.0 would not be understood.
+
+# ABSTRACT: auditd log parser with no external dependencies, using no perl features past 5.12
 
 =head1 WHY
 
@@ -107,7 +110,13 @@ sub search {
         my %parsed = map {
             my @out = split(/=/, $_);
             shift @out, join('=',@out)
-        } grep { $_ } map { s/"//g; chomp; $_ } split(/ /,$_);
+        } grep { $_ } map {
+            my $subj = $_;
+            $subj =~ s/"//g;
+            chomp $subj;
+            $subj
+        } split(/ /,$_);
+
         $line++;
         $parsed{line} = $line;
         chomp $timestamp;