aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShlomi Fish <shlomif@shlomifish.org>2015-07-25 15:37:17 +0300
committerShlomi Fish <shlomif@shlomifish.org>2015-07-25 15:37:17 +0300
commitd328576bb582704c38319cbead36723fca6874af (patch)
tree08da193b159cc82f69cb81c8ebaf27c665d0510e
parent1aebb8fa9656dd85275e0033fc9f2dbc94557171 (diff)
downloadspec-helper-d328576bb582704c38319cbead36723fca6874af.tar
spec-helper-d328576bb582704c38319cbead36723fca6874af.tar.gz
spec-helper-d328576bb582704c38319cbead36723fca6874af.tar.bz2
spec-helper-d328576bb582704c38319cbead36723fca6874af.tar.xz
spec-helper-d328576bb582704c38319cbead36723fca6874af.zip
Fix warnings/etc. on recent perls.
-rw-r--r--NEWS4
-rwxr-xr-xcompress_files6
-rwxr-xr-xgprintify6
3 files changed, 12 insertions, 4 deletions
diff --git a/NEWS b/NEWS
index 5b7ec81..99846ef 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,7 @@
+2015-07-25 Shlomi Fish <shlomif@cpan.org> 0.31.9
+ * gprintf: eliminate warnings on perl-5.22.0-and-above.
+ * compress_files: Fix handling of $_ in the File::Find::find() callback.
+
2012-07-24 Colin Guthrie <colin@magiea.org> 0.31.8
* fix_pamd: Check for /usr/lib[64]/security/ folder too after usrmove
* relink_symlinks: Do not make symlinks to /dev, /proc or /sys relative
diff --git a/compress_files b/compress_files
index 0d90c42..9d5e50f 100755
--- a/compress_files
+++ b/compress_files
@@ -126,7 +126,9 @@ if (@files) {
# Fix up symlinks that were pointing to the uncompressed files.
sub link_function {
- local ($_) = @_;
+ # $_ is already defined by File::Find.
+ #
+
# skip everything but symlinks
return unless -l $_;
# skip non-dangling symlinks
@@ -140,6 +142,8 @@ sub link_function {
# Bad link go on nowhere (any better idea) ?
unlink $_;
}
+
+ return;
}
File::Find::find(\&link_function, $buildroot);
diff --git a/gprintify b/gprintify
index 925e4af..12dc936 100755
--- a/gprintify
+++ b/gprintify
@@ -47,10 +47,10 @@ my $var_pattern = qr/
(?:
\$[a-zA-Z0-9_]+ # simple variable name
|
- \${ # protected variable name
+ \$\{ # protected variable name
[a-zA-Z0-9_]+
- (?:[#%]{1,2}[^}]+)? # with optional expansion pattern
- }
+ (?:[#%]{1,2}[^\}]+)? # with optional expansion pattern
+ \}
)
)
/x;