commit 93fbacc: [Minor] Format perl scripts using current perltidy version

Anton Yuzhaninov citrin+git at citrin.ru
Thu Jun 20 18:35:05 UTC 2019


Author: Anton Yuzhaninov
Date: 2019-06-20 20:16:37 +0200
URL: https://github.com/rspamd/rspamd/commit/93fbacc6fe590be3c5212a34fcda9b3a1c0ffcce (refs/pull/2934/head)

[Minor] Format perl scripts using current perltidy version

---
 utils/asn.pl             | 2 +-
 utils/classifier_test.pl | 6 +++---
 utils/rspamd_stats.pl    | 8 ++++----
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/utils/asn.pl b/utils/asn.pl
index b5f2ca41e..fe5436354 100644
--- a/utils/asn.pl
+++ b/utils/asn.pl
@@ -63,7 +63,7 @@ sub download_file {
     my ($u) = @_;
 
     print "Fetching $u\n";
-    my $ff = File::Fetch->new( uri => $u );
+    my $ff    = File::Fetch->new( uri => $u );
     my $where = $ff->fetch( to => $download_target ) or die $ff->error;
 
     return $where;
diff --git a/utils/classifier_test.pl b/utils/classifier_test.pl
index 994ad8ce8..238417f99 100644
--- a/utils/classifier_test.pl
+++ b/utils/classifier_test.pl
@@ -73,7 +73,7 @@ sub learn_rspamc {
     my ( $files, $spam ) = @_;
     my $processed = 0;
 
-    my $cmd = $spam ? "learn_spam" : "learn_ham";
+    my $cmd         = $spam ? "learn_spam" : "learn_ham";
     my $args_quoted = shell_quote @{$files};
     open( my $p, "$rspamc -t $timeout -c $classifier --compact -j -n $parallel $cmd $args_quoted |" )
       or die "cannot spawn $rspamc: $!";
@@ -94,7 +94,7 @@ sub learn_bogofilter {
 
     foreach my $f ( @{$files} ) {
         my $args_quoted = shell_quote $f;
-        my $fl = $spam ? "-s" : "-n";
+        my $fl          = $spam ? "-s" : "-n";
         `$bogofilter  -I $args_quoted $fl`;
         if ( $? == 0 ) {
             $processed++;
@@ -110,7 +110,7 @@ sub learn_dspam {
 
     foreach my $f ( @{$files} ) {
         my $args_quoted = shell_quote $f;
-        my $fl = $spam ? "--class=spam" : "--class=innocent";
+        my $fl          = $spam ? "--class=spam" : "--class=innocent";
         open( my $p, "|$dspam --user nobody --source=corpus --stdout --mode=toe $fl" )
           or die "cannot run $dspam: $!";
 
diff --git a/utils/rspamd_stats.pl b/utils/rspamd_stats.pl
index a6d603709..6d304742a 100755
--- a/utils/rspamd_stats.pl
+++ b/utils/rspamd_stats.pl
@@ -100,7 +100,7 @@ foreach my $s (@symbols_bidirectional) {
 # Deal with groups
 my $group_id = 0;
 foreach my $g (@symbols_groups) {
-    my @symbols = split /,/, $g;
+    my @symbols    = split /,/, $g;
     my $group_name = "group$group_id";
 
     foreach my $s (@symbols) {
@@ -124,7 +124,7 @@ elsif ( -d "$log_file" ) {
     # Process logs
     foreach (@logs) {
         my $ext = (/[^.]+\.?([^.]*?)$/)[0];
-        my $dc = $decompressor{$ext} || 'cat';
+        my $dc  = $decompressor{$ext} || 'cat';
 
         open( $rspamd_log, "-|", "$dc $log_dir/$_" )
           or die "cannot execute $dc $log_dir/$_ : $!";
@@ -143,7 +143,7 @@ elsif ( -d "$log_file" ) {
 }
 else {
     my $ext = ( $log_file =~ /[^.]+\.?([^.]*?)$/ )[0];
-    my $dc = $decompressor{$ext} || 'cat';
+    my $dc  = $decompressor{$ext} || 'cat';
     open( $rspamd_log, "-|", "$dc $log_file" )
       or die "cannot execute $dc $log_file : $!";
     $spinner_update_time = 0;                         # Force spinner update
@@ -679,7 +679,7 @@ sub GetLogfilesList {
     opendir( DIR, $dir ) or die $!;
 
     my $pattern = join( '|', keys %decompressor );
-    my $re = qr/\.[0-9]+(?:\.(?:$pattern))?/;
+    my $re      = qr/\.[0-9]+(?:\.(?:$pattern))?/;
 
     # Add unnumbered logs first
     my @logs =


More information about the Commits mailing list