diff --git a/kdesvn-build b/kdesvn-build index eb3d40f..05eb299 100755 --- a/kdesvn-build +++ b/kdesvn-build @@ -829,6 +829,32 @@ sub get_output_file return $fname; } +# This subroutine acts like split(' ', $_) except that double-quoted strings are not split in +# the process. Patch provided by Alain Boyer (alainboyer@gmail.com) based on a posting at +# http://www.perlmonks.org/?node_id=212174. Converted to an extended RE for readability by +# mpyne. +# +# First parameter: String to split on whitespace. +# Return value: A list of the individual words and quoted values in the string. +sub split_quoted_on_whitespace($) +{ + my $str = shift; + my @words = $str =~ + /"? # Match 0-1 quotes + ( # Open grouping expression + (?