develooper Front page | perl.perl5.porters | Postings from April 2013

Re: [perl #115708] Do a better job of escaping components of ldlibpthfor the shell

Thread Previous | Thread Next
From:
Eric Brine
Date:
April 17, 2013 15:37
Subject:
Re: [perl #115708] Do a better job of escaping components of ldlibpthfor the shell
Message ID:
CALJW-qGSRFWbmGx6E+Abb=DLJdZNwE74qz9CnMxUr7uMAaPNEw@mail.gmail.com
Reopened ticket. Will get a patch out shortly. If you want, you can run the
following to make sure it'll work:

quote() { case "$1" in '') echo "''" ;; *)  echo "$1" | sed
's/\([^a-zA-Z0-9.:_\-\/]\)/\\\1/g' ;; esac; }
x=\(bar\)
mkdir \(foo\)
cd \(foo\)
pwd="`pwd`"
ldlibpth="x=` quote "$pwd" `:` quote "$x" `"
echo "$ldlibpth"

Should give:

x=/home/ikegami/\(foo\):\(bar\)

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About