| Lintian::CheckScript(3) | Debian Package Checker | Lintian::CheckScript(3) |
Lintian::CheckScript - Check script meta data
use Lintian::CheckScript;
my $cs = Lintian::CheckScript->new ("$ENV{'LINTIAN_ROOT'}/checks/",
'files');
my $name = $cs->name;
foreach my $tag ($cs->tags) {
# $ti is an instance of Lintian::Tag::Info
my $ti = $cs->get_tag ($tag);
print "$tag is a part of the check $name\n";
# Do something with $ti / $tag
}
foreach my $needs ($cs->needs_info) {
print "$name needs $needs\n";
}
if ($cs->is_check_type ('binary') && $cs->is_check_type ('source')) {
# Check applies to binary pkgs AND source pkgs
}
Instances of this class represents the data in the check ".desc" files. It allows access to the tags (as Lintian::Tag::Info) and the common meta data of the check (such as Needs-Info).
Note in rare cases this may return undef. This is the case for the lintian.desc, where this field is simply not present.
Note if $cs->type return undef, this will return a truth value for all inputs.
The method may error out if loading the check failed or if the check itself calls die/croak/fail/etc.
Returns normally on success; the return value has no semantic meaning and is currently "undef".
NB: load_check can be used to determine if the check itself is loadable.
Originally written by Niels Thykier <niels@thykier.net> for Lintian.
| 2019-05-26 | Lintian v2.15.0 |