From 58ef1d3b63a8d6a5615aaa5fc8debeebf93f45ce Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Wed, 21 Oct 2009 09:39:50 -0700 Subject: [PATCH] Correct typo; elaborate on how PERL is processed --- docs/configuration_file_basics.xml | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/docs/configuration_file_basics.xml b/docs/configuration_file_basics.xml index dadfcb52a..06c555a1c 100644 --- a/docs/configuration_file_basics.xml +++ b/docs/configuration_file_basics.xml @@ -713,8 +713,8 @@ SHELL cat /etc/shorewall/rules.d/*.rules Perl-based compiler, Embedded scripts offer a richer and more flexible extension capability. - While inline scripts scripts may be written in either Shell or Perl, - those written in Perl have a lot more power. + While inline scripts may be written in either Shell or Perl, those + written in Perl have a lot more power. Embedded scripts can be either single-line or multi-line. Single line scripts take one of the following forms: @@ -740,17 +740,18 @@ SHELL cat /etc/shorewall/rules.d/*.rules ACCEPT loc fw tcp 22 ACCEPT dmz fw tcp 22 - Perl scripts run in the context of of the compiler process. To - produce output that will be processed by the compiler as if it were - embedded in the file at the point of the script, pass that output to the - shorewall() function. The Perl equivalent of the above SHELL script would - be:PERL for ( qw/net loc dmz/ ) { shorewall "ACCEPT $_ fw tcp 22"; }Perl - scripts are implicitly prefixed by the following: + Perl scripts run in the context of of the compiler process using + Perl's eval() function. Perl scripts are implicitly prefixed by the + following: package Shorewall::User; use Shorewall::Config qw/shorewall/; - A couple of more points should be mentioned: + To produce output that will be processed by the compiler as if it + were embedded in the file at the point of the script, pass that output to + the Shorewall::Config::shorewall() function. The Perl equivalent of the + above SHELL script would be:PERL for ( qw/net loc dmz/ ) { shorewall "ACCEPT $_ fw tcp 22"; }A + couple of more points should be mentioned: