aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2019-08-15 11:00:27 +0300
committerSergey Poznyakoff <gray@gnu.org>2019-08-15 11:00:27 +0300
commit35ca6e67bb06663f1c5cf1e4ceefaedf005bae80 (patch)
treee7a9e0c536e112ba4a699755ee208d258b61f0b2 /lib
parent32ad59e0a9c7f74c7c094d5091bce435c145fe33 (diff)
downloadacmeman-35ca6e67bb06663f1c5cf1e4ceefaedf005bae80.tar.gz
acmeman-35ca6e67bb06663f1c5cf1e4ceefaedf005bae80.tar.bz2
Fix acmeman --setup
* acmeman: Unset core.source for setup * lib/App/Acmeman/Config.pm (unset): New function.
Diffstat (limited to 'lib')
-rw-r--r--lib/App/Acmeman/Config.pm14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/App/Acmeman/Config.pm b/lib/App/Acmeman/Config.pm
index f566cb7..99b6aec 100644
--- a/lib/App/Acmeman/Config.pm
+++ b/lib/App/Acmeman/Config.pm
@@ -315,6 +315,20 @@ sub isset {
return defined $self->_getref(@_);
}
+sub unset {
+ my $self = shift;
+ my $last = pop;
+
+ return unless exists $self->{_conf};
+ my $ref = $self->{_conf};
+ for (@_) {
+ carp "component undefined" unless defined $_;
+ return unless exists $ref->{$_};
+ $ref = $ref->{$_};
+ }
+ delete $ref->{$last};
+}
+
sub set {
my $self = shift;
$self->{_conf} = {} unless exists $self->{_conf};

Return to:

Send suggestions and report system problems to the System administrator.