diff options
Diffstat (limited to 'solenv/bin/modules/installer')
-rw-r--r-- | solenv/bin/modules/installer/converter.pm | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/solenv/bin/modules/installer/converter.pm b/solenv/bin/modules/installer/converter.pm index f034df283a31..6a37b32fa543 100644 --- a/solenv/bin/modules/installer/converter.pm +++ b/solenv/bin/modules/installer/converter.pm @@ -4,9 +4,9 @@ # # $RCSfile: converter.pm,v $ # -# $Revision: 1.11 $ +# $Revision: 1.12 $ # -# last change: $Author: rt $ $Date: 2005-11-09 09:09:25 $ +# last change: $Author: obo $ $Date: 2006-09-15 14:35:54 $ # # The Contents of this file are made available subject to # the terms of GNU Lesser General Public License Version 2.1. @@ -140,6 +140,33 @@ sub convert_stringlist_into_array # into an array ############################################################################# +sub convert_stringlist_into_array_without_newline +{ + my ( $includestringref, $listseparator ) = @_; + + my @newarray = (); + my $first; + my $last = ${$includestringref}; + + while ( $last =~ /^\s*(.+?)\Q$listseparator\E(.+)\s*$/) # "$" for minimal matching + { + $first = $1; + $last = $2; + if ( defined($ENV{'USE_SHELL'}) && $ENV{'USE_SHELL'} eq "4nt" ) { $first =~ s/\//\\/g; } + push(@newarray, "$first"); + } + + if ( defined($ENV{'USE_SHELL'}) && $ENV{'USE_SHELL'} eq "4nt" ) { $last =~ s/\//\\/g; } + push(@newarray, "$last"); + + return \@newarray; +} + +############################################################################# +# Converting a string list with separator $listseparator +# into an array +############################################################################# + sub convert_whitespace_stringlist_into_array { my ( $includestringref ) = @_; |