Lintian::Profile (3)
Leading comments
Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) Standard preamble: ========================================================================
NAME
Lintian::Profile - Profile parser for LintianSYNOPSIS
# Load the debian profile (if available) my $profile = Lintian::Profile->new ('debian'); # Load the debian profile using an explicit search path $profile = Lintian::Profile->new ('debian', ['/path/to/alt/root', $ENV{'LINTIAN_ROOT'}]); # Load the "default" profile for the current vendor $profile = Lintian::Profile->new; foreach my $tag ($profile->tags) { print "Enabled tag: $tag\n"; } # ...
DESCRIPTION
Lintian::Profile handles finding, parsing and implementation of Lintian Profiles as well as loading the relevant Lintian checks.CLASS METHODS
- Lintian::Profile->new ([$profname[, $ipath[, $extra]]])
-
Creates a new profile from the profile. $profname is the name of the
profile and $ipath is a list reference containing the path
to one (or more) Lintian ``roots''.
If $profname is "undef", the default vendor will be loaded based on Dpkg::Vendor::get_current_vendor.
If $ipath is not given, a default one will be used.
- $prof->profile_list
-
Returns a list ref of the (normalized) names of the profile and its
parents. The last element of the list is the name of the profile
itself, the second last is its parent and so on.
Note: This list reference and its contents should not be modified.
- $prof->name
- Returns the name of the profile, which may differ from the name used to create this instance of the profile (e.g. due to symlinks).
- $prof->tags([$known])
-
Returns the list of tags in this profile. If $known is given
and it is a truth value, the list of known tags is returned.
Otherwise only the enabled tags will be returned.
Note: The contents of this list should not be modified.
- $prof->scripts ([$known])
- Returns the list of Check-Scripts in this profile. If $known is given and it is a truth value, the list of known Check-Scripts is returned. Otherwise only checks with an enabled tag will be enabled.
- $prof->is_overridable ($tag)
- Returns a false value if the tag has been marked as ``non-overridable''. Otherwise it returns a truth value.
- $prof->get_tag ($tag[, $known])
- Returns the Lintian::Tag::Info for $tag if it is enabled for the profile (or just a ``known tag'' if $known is given and a truth value). Otherwise it returns undef.
- $prof->get_script ($script[, $known])
-
Returns the Lintian::CheckScript for $script if it is enabled for the
profile (or just a ``known script'' if $known is given and a truth value).
Otherwise it returns undef.
Note: A script is enabled as long as at least one of the tags it provides are enabled.
- $prof->enable_tags (@tags)
- Enables all tags named in @tags. Croaks if an unknown tag is found.
- $prof->disable_tags (@tags)
- Disable all tags named in @tags. Croaks if an unknown tag is found.
- $prof->include_path ([$path])
-
Returns an array of paths to the (partial) Lintian roots, which are
used by this profile. The paths are ordered from ``highest'' to
``lowest'' priority (i.e. items in the earlier paths should shadow those
in later ones).
If $path is given, the array will contain the paths to the path in these roots denoted by $path.
Paths returned are not guaranteed to exists.