.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Debian::PkgPerl::Util 3pm" .TH Debian::PkgPerl::Util 3pm 2024-03-04 "pkg-perl-tools 0.78" "Debian Perl packaging Tools" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Debian::PkgPerl::Util \- utility functions for PkgPerl tools .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 4 \& use Debian::PkgPerl::Util; \& ... \& $dep = "$dep " \& unless Debian::PkgPerl::Util\->probable_build_dependency($pkg); \& \& $cachefile = Debian::PkgPerl::Util\->download_and_cache_file( \& "https://example.com/foo.txt", \& "bla.txt", \& 86400 \& ); .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" \&\fBDebian::PkgPerl::Util\fR contains some utility functions for PkgPerl tools. .SH METHODS .IX Header "METHODS" .IP "\fBprobable_build_dependency\fR(\fIpackage name\fR)" 4 .IX Item "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. .IP "\fBdownload_and_cache_file\fR(\fIURL\fR, \fIlocal filename\fR, \fIexpiration time in seconds\fR)" 4 .IX Item "download_and_cache_file(URL, local filename, expiration time in seconds)" Helper function to download a file from \fIURL\fR and save it in \&\fR\f(CI$ENV\fR\fI{XDG_CACHE_HOME}/pkg\-perl\-tools/\fR (or \fI\fR\f(CI$ENV\fR\fI{HOME}/.cache/pkg\-perl\-tools/\fR) as \fIfilename\fR, unless the file already exists and is younger than \&\fIexpiration time\fR in seconds. .Sp Returns the full filename as a string. .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" .IP "Copyright 2022\-2023 gregor herrmann gregoa@debian.org" 4 .IX Item "Copyright 2022-2023 gregor herrmann gregoa@debian.org" .PD 0 .IP "Copyright 2022 Damyan Ivanov dmn@debian.org" 4 .IX Item "Copyright 2022 Damyan Ivanov dmn@debian.org" .PD .PP This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License. .PP See for more information.