Lintian::CollScript(3) Collection script handle


use Lintian::CollScript;
my $cs = Lintian::CollScript->new ("$ENV{'LINTIAN_ROOT'}/collection/index.desc");
my $name = $cs->name;
foreach my $needs ($cs->needs_info) {
print "$name needs $needs\n";


Instances of this class represents the data in the collection ``.desc'' files. It allows access to the common meta data of the collection (such as Needs-Info).


new (FILE)
Parse FILE as a collection desc file.


Returns the ``name'' of the collection script. This is the value in the Collector-Script field in the file.
Returns the value stored in the ``Type'' field of the file. For the purpose of testing if the collection applies to a given package type, the ``is_type'' method can be used instead.
Returns the value of the ``Version'' field of the file. This should be an integer describing the version of the collector script.
Returns a truth value if the collection has the ``auto-remove'' flag.
Returns the absolute path to the collection script.
The call interface for this collection script.
The collection is run by invoking the script denoted by script_path with the proper arguments.

This is the default value.

The collection is implemented in Perl in such a way that it can be loaded into perl and run via the ``collect (PKG, TASK, DIR)'' method.

Collections that have the ``perl-coll'' can also be run as if they had the ``exec'' interface (see above).

needs_info ([COND])
Returns a list of all items listed in the Needs-Info field. Neither the list nor its contents should be modified.

COND is optional and used to determine what conditions are true. If omitted, all ``extra'' dependencies are returned. Otherwise, only the dependencies required by COND are included. COND is a hashref and with the following key/values:

The value is a package type that determines which package type is being unpacked. This is used to determine if the condition for ``<dep> [<type>]'' relations are true or not.
is_type (TYPE)
Returns a truth value if this collection can be applied to a TYPE package.
collect (PKG, TASK, DIR)


Originally written by Niels Thykier <[email protected]> for Lintian.