The following commit has been merged in the master branch:
commit e40e07a583f8738e0610c4aebb832091f48e9588
Author: Guillem Jover <[email protected]>
Date:   Thu Jan 3 00:56:15 2013 +0100

    perl: Use correct comparison operator for each type
    
    Fixes ValuesAndExpressions::ProhibitMismatchedOperators.
    
    Warned-by: perlcritic

diff --git a/dselect/methods/ftp/update b/dselect/methods/ftp/update
index 048044b..46bbdd8 100755
--- a/dselect/methods/ftp/update
+++ b/dselect/methods/ftp/update
@@ -39,7 +39,7 @@ if ($option eq 'manual') {
        print 'Enter package file name:';
        my $fn = <STDIN>;
        chomp $fn;
-       if ($fn == '') {
+       if ($fn eq '') {
            exit 0;
        }
        if ( -f $fn ) {
diff --git a/scripts/Dpkg/Source/Package/V3/quilt.pm 
b/scripts/Dpkg/Source/Package/V3/quilt.pm
index bca916b..a2843dd 100644
--- a/scripts/Dpkg/Source/Package/V3/quilt.pm
+++ b/scripts/Dpkg/Source/Package/V3/quilt.pm
@@ -71,7 +71,7 @@ sub build_quilt_object {
 sub can_build {
     my ($self, $dir) = @_;
     my ($code, $msg) = $self->SUPER::can_build($dir);
-    return ($code, $msg) if $code eq 0;
+    return ($code, $msg) if $code == 0;
     my $quilt = $self->build_quilt_object($dir);
     $msg = $quilt->find_problems();
     return (0, $msg) if $msg;
diff --git a/test/100_critic.t b/test/100_critic.t
index 307b8b0..2bdec14 100644
--- a/test/100_critic.t
+++ b/test/100_critic.t
@@ -77,6 +77,7 @@ my @policies = qw(
     ValuesAndExpressions::ProhibitComplexVersion
     ValuesAndExpressions::ProhibitInterpolationOfLiterals
     ValuesAndExpressions::ProhibitLongChainsOfMethodCalls
+    ValuesAndExpressions::ProhibitMismatchedOperators
     ValuesAndExpressions::ProhibitQuotesAsQuotelikeOperatorDelimiters
     ValuesAndExpressions::ProhibitSpecialLiteralHeredocTerminator
     ValuesAndExpressions::ProhibitVersionStrings

-- 
dpkg's main repository


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

Reply via email to