summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changes8
-rw-r--r--Makefile.PL4
-rw-r--r--lib/Config/HAProxy.pm27
-rw-r--r--lib/Config/HAProxy/Node.pm1
4 files changed, 38 insertions, 2 deletions
diff --git a/Changes b/Changes
index 0d0a1a9..a7f1b78 100644
--- a/Changes
+++ b/Changes
@@ -2,2 +2,10 @@ Revision history for Perl extension Config::HAProxy.
+1.08 Thu Jun 23 15:21:17 2022
+ - Handle the 'resolvers' section.
+ - New class methods for declaring (and undeclaring) sections.
+ - Fix changing the argv of a Node.
+
+1.06 Fri Feb 12 20:37:32 2021
+ - Change bugtracker address.
+
1.05 Mon May 27 13:59:57 2019
diff --git a/Makefile.PL b/Makefile.PL
index 754d3aa..d7c08b9 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -29,2 +29,6 @@ WriteMakefile(
},
+ bugtracker => {
+ web => 'https://puszcza.gnu.org.ua/bugs/?group=config-haproxy',
+ mailto => 'gray+config-haproxy@gnu.org.ua'
+ }
},
diff --git a/lib/Config/HAProxy.pm b/lib/Config/HAProxy.pm
index 35e75b9..f220051 100644
--- a/lib/Config/HAProxy.pm
+++ b/lib/Config/HAProxy.pm
@@ -18,3 +18,3 @@ use Carp;
-our $VERSION = '1.05';
+our $VERSION = '1.08';
@@ -25,2 +25,3 @@ my %sections = (
backend => 1,
+ resolvers => 1
);
@@ -90,2 +91,12 @@ sub parse {
+sub declare_section {
+ my ($class, $name) = @_;
+ $sections{$name} = 1;
+}
+
+sub undeclare_section {
+ my ($class, $name) = @_;
+ $sections{$name} = 0;
+}
+
sub reset {
@@ -346,3 +357,5 @@ A container, representing a C<compound statement>, i.e. a statement that
contains multiple sub-statements. Compound statements are: B<global>,
-B<defaults>, B<frontend>, and B<backend>.
+B<defaults>, B<frontend>, B<backend>, and B<resolvers>. The list of
+compound statements may be modified using the B<declare_section> and
+B<undeclare_section> class methods (see below).
@@ -372,2 +385,12 @@ B<Config::HAProxy::Node>.
+=head1 CLASS METHODS
+
+ $cfg = Config::HAProxy::declare_section($name)
+
+Declares B<$name> as a top-level section.
+
+ $cfg = Config::HAProxy::undeclare_section($name)
+
+Cancels declaration of B<$name> as a top-level section.
+
=head1 CONSTRUCTOR
diff --git a/lib/Config/HAProxy/Node.pm b/lib/Config/HAProxy/Node.pm
index 8210067..32e63c0 100644
--- a/lib/Config/HAProxy/Node.pm
+++ b/lib/Config/HAProxy/Node.pm
@@ -40,2 +40,3 @@ sub argv {
$self->{_argv} = $val;
+ delete $self->{_orig};
}

Return to:

Send suggestions and report system problems to the System administrator.