.\" -*- 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::WNPP::Query 3pm" .TH Debian::WNPP::Query 3pm 2024-03-14 "perl v5.38.2" "User Contributed Perl Documentation" .\" 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::WNPP::Query \- offline storage of Debian's work\-needing package lists .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 7 \& my $wnpp = Debian::WNPP::Query\->new( \& { cache_dir => \*(Aq/somewhere\*(Aq, \& network_enabled => 0, \& ttl => 3600 * 24, \& bug_types => [qw( ITP RFP )] \& } \& ); \& \& my @bugs = $wnpp\->bugs_for_package(\*(Aqken\-lee\*(Aq); .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" Debian::WNPP::Query provides a way to retrieve and cache the contents of Debian's "Work-needing and prospective packages" lists. .SH CONSTRUCTOR .IX Header "CONSTRUCTOR" \&\fBnew\fR is the constructor. Initial field values are to be given as a hash reference. .PP If \fBcache_file\fR is given, it is read. .SH FIELDS .IX Header "FIELDS" .IP "cache_file \fIpath\fR" 4 .IX Item "cache_file path" The path to the file holding the offline cache of the WNPP lists. If not specified, no cache is read or written. .IP "ttl \fIseconds\fR" 4 .IX Item "ttl seconds" The time after which the on-disk cache is considered too old and WNPP pages are retrieved afresh. Ignored if \fBcache_file\fR is not defined. Defaults to 86400 (1 day). .IP "bug_types \fIarrayref\fR" 4 .IX Item "bug_types arrayref" Specified which bug types to retrieve. For example, if you are interested in ITP and RFP bugs, there is no point in downloading, parsing and storing ITA/RFA/O bugs. By default all types of bugs are processed. .SH METHODS .IX Header "METHODS" .IP bugs_for_package(\fIpackage\fR) 4 .IX Item "bugs_for_package(package)" Returns a list of bugs matching the given package name. Normally the list would contain only one bug, but there are no guarantees. .SH "SEE ALSO" .IX Header "SEE ALSO" .IP Debian::WNPP::Bug 4 .IX Item "Debian::WNPP::Bug" .PD 0 .IP 4 .IX Item "" .PD .SH "AUTHOR AND COPYRIGHT" .IX Header "AUTHOR AND COPYRIGHT" .IP "Copyright (C) 2010 Damyan Ivanov " 4 .IX Item "Copyright (C) 2010 Damyan Ivanov " .PP This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. .PP This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. .PP You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110\-1301 USA.