aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xfind-requires.in2
-rwxr-xr-xperl.req-from-meta7
2 files changed, 3 insertions, 6 deletions
diff --git a/find-requires.in b/find-requires.in
index 66e80e3..0ef6d51 100755
--- a/find-requires.in
+++ b/find-requires.in
@@ -178,7 +178,7 @@ fi
#
# --- Perl modules.
-perlmeta=$( echo $filelist | tr '[:blank:]' \\n | egrep '^META.(yml|json)' | head -1 )
+perlmeta=$( echo $filelist | tr '[:blank:]' \\n | egrep '/MYMETA.yml$' )
if [ -n "$perlmeta" ]
then
[ -x @RPMVENDORDIR@/perl.req-from-meta ] && \
diff --git a/perl.req-from-meta b/perl.req-from-meta
index 5b612dd..243f54f 100755
--- a/perl.req-from-meta
+++ b/perl.req-from-meta
@@ -3,8 +3,7 @@
use strict;
use warnings;
-use JSON qw{ from_json };
-use YAML qw{ Load };
+use YAML qw{ Load };
# slurp the file
my $path = shift;
@@ -13,9 +12,7 @@ my $data = do { local $/; <$fh> };
close $fh;
# parse meta - either yaml or json
-my $meta = $path =~ /\.yml$/
- ? Load( $data )
- : from_json( $data );
+my $meta = Load($data);
# dump the requires with their version
my $requires = $meta->{requires};