Skip to content

Commit

Permalink
fix argument spliiting
Browse files Browse the repository at this point in the history
' ' is like \s+ but removes leading spaces.
  • Loading branch information
mlschroe committed Sep 3, 2014
1 parent 7dd727a commit 93c73e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Build/Rpm.pm
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ reexpand:
$line = $2;
}
push @expandstack, ($expandedline, $line, $optmacros);
$optmacros = adaptmacros(\%macros, $optmacros, grabargs($macname, $macros_args{$macname}, split(/ /, $macdata)));
$optmacros = adaptmacros(\%macros, $optmacros, grabargs($macname, $macros_args{$macname}, split(' ', $macdata)));
$line = $macros{$macname};
$expandedline = '';
next;
Expand Down

2 comments on commit 93c73e9

@darix
Copy link
Member

@darix darix commented on 93c73e9 Sep 3, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not just make it /\s+/? wouldnt ' ' generate nil elements in the list?

@mlschroe
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried that first, but they I have an empty element if the string starts with spaces. ' ' is special cased in perl, it is exactly like /s+/ but strips leading spaces...

Please sign in to comment.