diff options
-rw-r--r-- | Changes | 11 | ||||
-rw-r--r-- | Makefile.PL | 4 | ||||
-rw-r--r-- | lib/Config/HAProxy.pm | 29 | ||||
-rw-r--r-- | lib/Config/HAProxy/Node.pm | 1 |
4 files changed, 42 insertions, 3 deletions
@@ -2,2 +2,13 @@ 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 + - unlink temporary file on error + 1.04 Sun May 26 12:23:54 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 175e402..f220051 100644 --- a/lib/Config/HAProxy.pm +++ b/lib/Config/HAProxy.pm @@ -18,3 +18,3 @@ use Carp; -our $VERSION = '1.04'; +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). @@ -371,3 +384,13 @@ For a detailed description of the node class and its methods, please refer to 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}; } |