aboutsummaryrefslogtreecommitdiffstats
path: root/perl.req-from-meta
diff options
context:
space:
mode:
authorJérôme Quelin <jquelin@mandriva.org>2010-02-10 16:34:36 +0000
committerJérôme Quelin <jquelin@mandriva.org>2010-02-10 16:34:36 +0000
commit7770611e745f20814ff34569608edd630b8ab079 (patch)
tree7b4d9d5459b985b5ec77b262ebb5615f26253a09 /perl.req-from-meta
parent96e402eff8be72bb817aaba1424f07b86dd76b76 (diff)
downloadrpm-setup-7770611e745f20814ff34569608edd630b8ab079.tar
rpm-setup-7770611e745f20814ff34569608edd630b8ab079.tar.gz
rpm-setup-7770611e745f20814ff34569608edd630b8ab079.tar.bz2
rpm-setup-7770611e745f20814ff34569608edd630b8ab079.tar.xz
rpm-setup-7770611e745f20814ff34569608edd630b8ab079.zip
using generated MYMETA.yml would be better. indeed, this creates what's
been detected.
Diffstat (limited to 'perl.req-from-meta')
-rwxr-xr-xperl.req-from-meta7
1 files changed, 2 insertions, 5 deletions
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};