Perl6 module to retrieve a file from the internet by the best available method
Perl6
Latest commit 2212cbd Oct 24, 2016 @jonathanstowe Document the function
Permalink
Failed to load latest commit information.
lib/URI Document the function Oct 24, 2016
t Add tests for fetch-uri Oct 23, 2016
.gitignore Add .precomp to .gitignore Oct 23, 2016
.travis.yml Add travis Oct 24, 2016
LICENCE Add the LICENCE Oct 23, 2016
META6.json Add the META file Oct 23, 2016
README.md Add travis badge Oct 24, 2016

README.md

URI-FetchFile

Perl6 module to retrieve a file from the internet by the best available method

Build Status

Synopsis

use URI::FetchFile;

if fetch-uri('http://rakudo.org/downloads/star/rakudo-star-2016.10.tar.gz', 'rakudo-star-2016.10.tar.gz') {
    # do something with the file
}
else {
    die "couldn't get file";
}

Description

This provides a simple method of retrieving a single file via HTTP using the best available method whilst trying to limit the dependencies.

It is intended to be used by installers or builders that may need to retrieve a file but otherwise have no need for an HTTP client.

It will try to use the first available method from:

* HTTP::UserAgent

* LWP::Simple

* curl

* wget

Please feel free to suggest and/or implement other mechanisms.

Installation

Assuming you have a working installation of Rakudo perl6 you cam install this using either zef or panda:

zef install URI::FetchFile

# or

panda install URI::FetchFile

Other mechanisms may become available in the future.

Support

Please make any reports, suggestions etc to https://github.com/jonathanstowe/URI-FetchFile/issues

Licence and Copyright

© Jonathan Stowe 2016

This is free software please see the the LICENCE file for details.