The following commit has been merged in the master branch:
commit c2198a33d0f2d7df6f437c82ac11e92bf1dc4e22
Author: Guillem Jover <[email protected]>
Date:   Fri Jan 4 11:03:01 2013 +0100

    Dpkg::Source::Patch: Use number separator to ease readability
    
    Fixes ValuesAndExpressions::RequireNumberSeparators.
    
    Warned-by: perlcritic

diff --git a/scripts/Dpkg/Source/Patch.pm b/scripts/Dpkg/Source/Patch.pm
index e9837b0..21535d6 100644
--- a/scripts/Dpkg/Source/Patch.pm
+++ b/scripts/Dpkg/Source/Patch.pm
@@ -84,11 +84,11 @@ sub add_diff_file {
            my $ts = (stat($old))[9];
            my $t = POSIX::strftime('%Y-%m-%d %H:%M:%S', gmtime($ts));
            $opts{label_old} .= sprintf("\t%s.%09d +0000", $t,
-                                           ($ts-int($ts))*1000000000);
+                                       ($ts - int($ts)) * 1_000_000_000);
            $ts = (stat($new))[9];
            $t = POSIX::strftime('%Y-%m-%d %H:%M:%S', gmtime($ts));
            $opts{label_new} .= sprintf("\t%s.%09d +0000", $t,
-                                           ($ts-int($ts))*1000000000);
+                                       ($ts - int($ts)) * 1_000_000_000);
        } else {
            # Space in filenames need special treatment
            $opts{label_old} .= "\t" if $opts{label_old} =~ / /;
diff --git a/test/100_critic.t b/test/100_critic.t
index 9062075..d91250f 100644
--- a/test/100_critic.t
+++ b/test/100_critic.t
@@ -87,6 +87,7 @@ my @policies = qw(
     ValuesAndExpressions::ProhibitSpecialLiteralHeredocTerminator
     ValuesAndExpressions::ProhibitVersionStrings
     ValuesAndExpressions::RequireConstantVersion
+    ValuesAndExpressions::RequireNumberSeparators
     ValuesAndExpressions::RequireQuotedHeredocTerminator
     ValuesAndExpressions::RequireUpperCaseHeredocTerminator
     Variables::ProhibitAugmentedAssignmentInDeclaration

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to