Skip to content

Commit 89b3312

Browse files
committed
Merge gprintify changes from Mageia for compatibility with newer perl
Signed-off-by: Bernhard Rosenkränzer <bero@lindev.ch>
1 parent e9a42d1 commit 89b3312

1 file changed

Lines changed: 4 additions & 11 deletions

File tree

gprintify

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ use warnings;
77
use File::Find;
88
use File::Temp;
99
use File::Slurp;
10+
use List::MoreUtils qw(none);
1011

1112
my $string_pattern = qr/
1213
^
@@ -46,24 +47,16 @@ my $var_pattern = qr/
4647
(?:
4748
\$[a-zA-Z0-9_]+ # simple variable name
4849
|
49-
\${ # protected variable name
50+
\$\{ # protected variable name
5051
[a-zA-Z0-9_]+
51-
(?:[#%]{1,2}[^}]+)? # with optional expansion pattern
52-
}
52+
(?:[#%]{1,2}[^\}]+)? # with optional expansion pattern
53+
\}
5354
)
5455
)
5556
/x;
5657

5758
main(@ARGV) unless caller();
5859

59-
sub none (&@) {
60-
my $f = shift;
61-
foreach ( @_ ) {
62-
return 0 if $f->();
63-
}
64-
return 1;
65-
}
66-
6760
sub main {
6861
my $buildroot = $ENV{RPM_BUILD_ROOT};
6962
die "No build root defined" unless $buildroot;

0 commit comments

Comments
 (0)