The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Ixchel::functions::github_fetch_release_asset - Fetches a release asset from a Github repo.

VERSION

Version 0.0.1

SYNOPSIS

    use Ixchel::functions::github_fetch_release_asset;

    my $releases;
    eval{ $releases=github_fetch_release_asset(owner=>'mikefarah', repo=>'yq'); };
    if ($@) {
        print 'Error: '.$@."\n";
    }

Functions

github_fetch_release_asset

The following args are required.

    - owner :: The owner of the repo in question.

    - repo :: Repo to fetch the releases for.

    - asset :: The name of the asset to fetch.

The following are optional.

    - pre :: If prereleases are okay fetch fetch or not.
        Default :: 0

    - draft :: If draft releases are okay.
        Default :: 0

    - output :: Where to write the file to. If undef, will be writen
            to a file named the same as the asset under the current dir.

    - atomic :: If it should attempt to write the file atomically.
        Default :: 0

    - append :: Append the fetched data to the output file if it already exists.
        Default :: 0

    - umask :: The umask to use. Defaults to what ever sysopen uses.

    - return :: Return the fetched item instead of writing it to a file.
        Default :: 0

If the $ENV variables below are set, they will be used for proxy info.

    $ENV{FTP_PROXY}
    $ENV{HTTP_PROXY}
    $ENV{HTTPS_PROXY}

Upon errors, this will die.