Преглед изворни кода

dpkg-shlibdeps: Move regex variable inside function

The function is defined after its first call site, so the regex variable
is not found when compiling the code.
Guillem Jover пре 10 година
родитељ
комит
ae83a2d983
1 измењених фајлова са 13 додато и 12 уклоњено
  1. 13 12
      scripts/dpkg-shlibdeps.pl

+ 13 - 12
scripts/dpkg-shlibdeps.pl

@@ -670,20 +670,21 @@ sub split_soname {
     }
 }
 
-my $shlibs_re = qr{
-    ^\s*
-    (?:(\S+):\s+)?              # Optional type
-    (\S+)\s+                    # Library
-    (\S+)                       # Version
-    (?:
-      \s+
-      (\S.*\S)                  # Dependencies
-    )?
-    \s*$
-}x;
-
 sub extract_from_shlibs {
     my ($soname, $shlibfile) = @_;
+
+    my $shlibs_re = qr{
+        ^\s*
+        (?:(\S+):\s+)?              # Optional type
+        (\S+)\s+                    # Library
+        (\S+)                       # Version
+        (?:
+          \s+
+          (\S.*\S)                  # Dependencies
+        )?
+        \s*$
+    }x;
+
     # Split soname in name/version
     my ($libname, $libversion) = split_soname($soname);
     unless (defined $libname) {