Commit a9c7a93e authored by Bernhard Link's avatar Bernhard Link Committed by Guillem Jover

Dpkg::BuildFlags: Add get_feature_areas()

Add a way for a caller to enumerate all possible values of get_features().
Signed-off-by: Bernhard Link's avatarBernhard R. Link <>
Signed-off-by: Guillem Jover's avatarGuillem Jover <>
parent 0725ee2b
......@@ -18,7 +18,7 @@ package Dpkg::BuildFlags;
use strict;
use warnings;
our $VERSION = "1.02";
our $VERSION = "1.03";
use Dpkg::Gettext;
use Dpkg::BuildOptions;
......@@ -320,6 +320,18 @@ sub get {
return $self->{'flags'}{$key};
=item $bf->get_feature_areas()
Return the feature areas (i.e. the area values has_features will return
true for).
sub get_feature_areas {
my ($self) = @_;
return keys $self->{'features'};
=item $bf->get_features($area)
Return, for the given area, a hash with keys as feature names, and values
......@@ -394,6 +406,11 @@ based on the package maintainer directives.
New methods: $bf->get_features(), $bf->has_features(), $bf->set_feature().
=head2 Version 1.03
New method: $bf->get_feature_areas() to list possible values for
=head1 AUTHOR
Raphaël Hertzog <>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment