[SCM] Debian native package for Config::Model::Dpkg branch, master, updated. debian/2.036-23-ge793f9b

Dominique Dumont dod at debian.org
Mon May 27 12:06:29 UTC 2013


The following commit has been merged in the master branch:
commit e793f9bfe5774f2436c68e47f976f62391d54bc7
Author: Dominique Dumont <dod at debian.org>
Date:   Mon May 27 13:49:45 2013 +0200

    Patch backend: replaced 'given...when' with good old 'if' (Closes:  #709783)
    
    given/when use ~~ which now triggers a warning.

diff --git a/lib/Config/Model/Backend/Dpkg/Patch.pm b/lib/Config/Model/Backend/Dpkg/Patch.pm
index 873c5d3..a066cce 100644
--- a/lib/Config/Model/Backend/Dpkg/Patch.pm
+++ b/lib/Config/Model/Backend/Dpkg/Patch.pm
@@ -52,16 +52,14 @@ sub read {
     my ( $header, $diff ) = ( [],[] );
     my $target = $header;
     foreach my $l ( $patch_io->getlines ) {
-        given ($l) {
-            when (/^---/) { 
-                # beginning of quilt style patch
-                $target = $diff ;
-            }
-            when (/^===/) { 
-                # beginning of git diff style patch
-                push @$diff, pop @$header if $target eq $header; # get back the Index: line
-                $target = $diff ; 
-            }
+        if ( $l =~ /^---/ ) {
+            # beginning of quilt style patch
+            $target = $diff;
+        }
+        elsif ( $l =~ /^===/ ) {
+            # beginning of git diff style patch
+            push @$diff, pop @$header if $target eq $header;    # get back the Index: line
+            $target = $diff;
         }
         push @$target, $l;
     }

-- 
Debian native package for Config::Model::Dpkg



More information about the Pkg-perl-cvs-commits mailing list