Lintian::CollScript - 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).
- name
- Returns the "name" of the collection script. This is the value
in the Collector-Script field in the file.
- type
- 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.
- script_path
- Returns the absolute path to the collection script.
- interface
- The call interface for this collection script.
- exec
- The collection is run by invoking the script denoted by script_path with
the proper arguments.
This is the default value.
- perl-coll
- 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:
- type
- 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 <niels@thykier.net> for
Lintian.