Use split_list2 in isolate_basic_target()

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2012-12-06 19:12:44 -08:00
parent 7190cd1265
commit 6ab5cfd63a

View File

@ -1228,7 +1228,13 @@ sub merge_macro_column( $$ ) {
# Get Macro Name -- strips away trailing /*, :* and (*) from the first column in a rule, macro or action.
#
sub isolate_basic_target( $ ) {
my $target = ( split '[/:]', $_[0])[0];
my $target = $_[0];
if ( $target =~ /[\/]/ ) {
( $target ) = split( '/', $target);
} else {
( $target ) = split_list2( $target, 'parameter' );
}
$target =~ /^(\w+)[(].*[)]$/ ? $1 : $target;
}