Re: escaping/unescaping Re: coding an Application in perl

Chapman Flack <[email protected]>
Newsgroups gmane.comp.archivers.amanda.devel
Message-ID <[email protected]>
On 02/26/2016 07:46 AM, Jean-Louis Martineau wrote:
> On 25/02/16 03:32 PM, Chapman Flack wrote:
>>    Property values will be in the same case they were in the
>>    configuration file, but will be escaped (e.g. the tab character
>>    replaced with \t, and so on, with \ being represented by \\)
>>
> in: perldoc Amanda::Util
> look for quote_string and unquote_string

Aha, thanks. Hey, github even displays a .pod file *rendered to
html* when browsed on the web! What'll they think of next? :)

When I read the .pod, it says that strings with nothing special
are unchanged, while strings with special stuff may have certain
characters \-escaped *and will be surrounded in double quotes*.

In Operations the \-escaping is mentioned but the surrounding by
double quotes is not. Does that mean:

a. merely an oversight in the Operations description, and the
   double quotes really will be present if any escaping was done?

b. the application is invoked through system() or equivalent,
   and the docs assume the shell will have consumed the double
   quotes already (but left the \-escaping intact)?

c. the application is invoked directly by execl() or equivalent,
   and is passed exactly the quote_string output but with the
   surrounding double quotes already stripped off?

d. something else I haven't thought of?

Thanks,
-Chap
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.