ソースを参照

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) {