mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-19 21:01:20 +01:00
Revert "Simplify push_action_params()"
This reverts commit 89ee25dde2
.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
8ab45b4de3
commit
c309ca3075
@ -1803,12 +1803,16 @@ sub embedded_perl( $ ) {
|
|||||||
sub push_action_params( $$ ) {
|
sub push_action_params( $$ ) {
|
||||||
my @params = split /,/, $_[1];
|
my @params = split /,/, $_[1];
|
||||||
my $oldparams = \@actparms;
|
my $oldparams = \@actparms;
|
||||||
my $params = @params;
|
|
||||||
|
|
||||||
@actparms = ();
|
@actparms = ();
|
||||||
|
|
||||||
$actparms[0] = $_[0];
|
$actparms[0] = $_[0];
|
||||||
@actparms[1..$params] = @params;
|
|
||||||
|
for ( my $i = 1; $i <= @params; $i++ ) {
|
||||||
|
my $val = $params[$i - 1];
|
||||||
|
|
||||||
|
$actparms[$i] = $val eq '-' ? '' : $val eq '--' ? '-' : $val;
|
||||||
|
}
|
||||||
|
|
||||||
$oldparams;
|
$oldparams;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user