diff options
author | Jérôme Quelin <jquelin@mandriva.org> | 2010-02-10 16:34:36 +0000 |
---|---|---|
committer | Jérôme Quelin <jquelin@mandriva.org> | 2010-02-10 16:34:36 +0000 |
commit | 7770611e745f20814ff34569608edd630b8ab079 (patch) | |
tree | 7b4d9d5459b985b5ec77b262ebb5615f26253a09 /perl.req-from-meta | |
parent | 96e402eff8be72bb817aaba1424f07b86dd76b76 (diff) | |
download | rpm-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-x | perl.req-from-meta | 7 |
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}; |