Lintian::Collect(3) | Debian Package Checker | Lintian::Collect(3) |
Lintian::Collect - Lintian interface to package data collection
my ($name, $type, $dir) = ('foobar', 'udeb', '/some/abs/path'); my $collect = Lintian::Collect->new ($name, $type, $dir); $name = $collect->name; $type = $collect->type;
Lintian::Collect provides the shared interface to package data used by source, binary and udeb packages and .changes files. It creates an object of the appropriate type and provides common functions used by the collection interface to all types of package.
Usually instances should not be created directly (exceptions include collections), but instead be requested via the info method in Lintian::Lab::Entry.
This module is in its infancy. Most of Lintian still reads all data from files in the laboratory whenever that data is needed and generates that data via collect scripts. The goal is to eventually access all data via this module and its subclasses so that the module can cache data where appropriate and possibly retire collect scripts in favor of caching that data in memory.
PACKAGE is the name of the package and is stored in the collect object. It can be retrieved with the "name" method.
BASEDIR is the base directory for the data and should be absolute.
If FIELDS is given it is assumed to be the fields from the underlying control file. This is only used to avoid an unnecessary read operation (possibly incl. an ar | gzip pipeline) when the fields are already known.
In addition to the instance methods documented here, see the documentation of Lintian::Collect::Source, Lintian::Collect::Binary and Lintian::Collect::Changes for instance methods specific to source and binary / udeb packages and .changes files.
Needs-Info requirements for using name: none
Needs-Info requirements for using type: none
Needs-Info requirements for using base_dir: none
Needs-Info requirements for using lab_data_path: "base_dir"
If FIELD is passed but not present, then this method will return DEFAULT (if given) or undef.
Otherwise this will return a hash of fields, where the key is the field name (in all lowercase).
Needs-Info requirements for using field: none
Needs-Info requirements for using is_non_free: "field ([FIELD[, DEFAULT]])"
Originally written by Russ Allbery <rra@debian.org> for Lintian.
lintian(1), Lintian::Collect::Binary, Lintian::Collect::Changes, Lintian::Collect::Source
2019-05-26 | Lintian v2.15.0 |