Debian::PkgPerl::Util(3pm)

Debian::PkgPerl::Util3pm

Utility functions for pkgperl tools

Usage

 use Debian::PkgPerl::Util;
 ...
 $dep = "$dep <!nocheck>"
     unless Debian::PkgPerl::Util->probable_build_dependency($pkg);
 $cachefile = Debian::PkgPerl::Util->download_and_cache_file(
     "https://example.com/foo.txt",
     "bla.txt",
     86400
 );

Overview

Debian::PkgPerl::Util contains some utility functions for PkgPerl tools.

Methods

probable_build_dependency(package name)

Returns true if the package name is likely to be used for building, and not only at runtime or only for testing.

download_and_cache_file(URL, local filename, expiration time in seconds)

Helper function to download a file from URL and save it in $ENV{XDG_CACHE_HOME}/pkg-perl-tools/ (or $ENV{HOME}/.cache/pkg-perl-tools/) as filename, unless the file already exists and is younger than expiration time in seconds.

Returns the full filename as a string.

Releases

2 releases since Debian 12 (Bookworm); the text changed 1 time.

  1. 12
  2. 13

From pkg-perl-tools 0.82 in Debian 13 (Trixie). Parsed by carta from the page's man source.