First version
This commit is contained in:
parent
10d1e8373b
commit
a4ea373e0d
1 changed files with 15 additions and 1 deletions
|
@ -1,3 +1,17 @@
|
||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
use strict;
|
use strict;
|
||||||
use warnings FATAL => 'all';
|
use warnings;
|
||||||
|
|
||||||
|
use Parse::RPM::Spec;
|
||||||
|
use LWP::UserAgent ();
|
||||||
|
|
||||||
|
my $spec = Parse::RPM::Spec->new( { file => @ARGV } );
|
||||||
|
say $spec->name;
|
||||||
|
my $url = $spec->url;
|
||||||
|
my $response = LWP::UserAgent->new( timeout => 10 )->get($url);
|
||||||
|
if ($response->is_success) {
|
||||||
|
print $response->decoded_content;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
die $response->status_line;
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue