From d7cbd1da214f8819a78d95ca08328539c8049f04 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Mon, 23 Sep 2013 12:21:44 -0700 Subject: [PATCH] Allow actions to manipulate the current comment from Perl. - Added set_comment() - moved push/pop_comment() to the :DEFAULT export --- Shorewall/Perl/Shorewall/Config.pm | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Shorewall/Perl/Shorewall/Config.pm b/Shorewall/Perl/Shorewall/Config.pm index 7fa42c1c0..76206ab9d 100644 --- a/Shorewall/Perl/Shorewall/Config.pm +++ b/Shorewall/Perl/Shorewall/Config.pm @@ -73,6 +73,10 @@ our @EXPORT = qw( get_inline_matches set_inline_matches + set_comment + push_comment + pop_comment + have_capability require_capability report_used_capabilities @@ -147,8 +151,6 @@ our %EXPORT_TAGS = ( internal => [ qw( create_temp_script process_comment no_comment macro_comment - push_comment - pop_comment dump_mark_layout $product @@ -2117,6 +2119,13 @@ sub clear_comment() { $nocomment = 0; } +# +# Set the current comment +# +sub set_comment( $ ) { + ( $comment ) = @_; +} + # # Push and Pop comment stack #