[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[lintian] 02/02: c/cruft: Replace inline closure with standalone sub



This is an automated email from the git hooks/post-receive script.

nthykier pushed a commit to branch master
in repository lintian.

commit e7bc48bda926a67c11c0fb274feecc8e35ad0643
Author: Niels Thykier <niels@thykier.net>
Date:   Sat Feb 22 19:56:54 2014 +0100

    c/cruft: Replace inline closure with standalone sub
    
    There was no reason for the closure to be a closure and it made the
    line a bit shorter (to please perltidy).
    
    Signed-off-by: Niels Thykier <niels@thykier.net>
---
 checks/cruft.pm | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/checks/cruft.pm b/checks/cruft.pm
index e93a91e..da64ef7 100644
--- a/checks/cruft.pm
+++ b/checks/cruft.pm
@@ -562,7 +562,7 @@ sub license_check {
         return;
     }
 
-    my $sfd = Lintian::SlidingWindow->new('<:raw', $path, sub { $_ = lc($_); });
+    my $sfd = Lintian::SlidingWindow->new('<:raw', $path, \&lc_block);
     my %licenseproblemhash = ();
 
     # we try to read this file in block and use a sliding window
@@ -881,6 +881,10 @@ sub _clean_block {
     return $text;
 }
 
+sub lc_block {
+    return $_ = lc($_);
+}
+
 1;
 
 # Local Variables:

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git


Reply to: