Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Escaping $tclsh in Makefile.PL

3 views
Skip to first unread message

Christopher Chavez

unread,
Aug 22, 2018, 5:30:03 AM8/22/18
to tc...@perl.org
In the Makefile.PL's for Tcl.pm, Tcl::Tk, and Tcl::pTk, the path to
tclsh should probably be escaped somehow. That way, any characters like
spaces get passed properly to the shell. I don't know what the best
portable way to do this would be, nor whether surrounding it with double
quotes (i.e. `"$tclsh" ...`) is sufficient.


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

Konovalov, Vadim

unread,
Aug 22, 2018, 7:30:02 AM8/22/18
to Christopher Chavez, tc...@perl.org
I wonder if quotemeta enough??

Konovalov, Vadim

unread,
Aug 22, 2018, 10:30:03 AM8/22/18
to Christopher Chavez, tc...@perl.org
> From: Christopher Chavez
> I haven't thought of an issue with using quotemeta
> (presumably without double quotes) on UNIX though, since at least bash seems
> fine with things being \-escaped.
>
>
> Still, I'm somewhat uneasy about putting
> this kind of logic, but it's probably better than leaving it how it currently
> is, and there's little else to do with using core Perl.

I don't think this makes the module more difficult to use

Ideally, just "cpan" install command should work.

If user wants customized build - then he already knows what she is doing.

So we're talking about experienced users on windows, who wants to pass something weird to --tclsh=.... ?

So if I have tclsh in whitespace-separated path, then double-quoting this command-line argument should suffice.
Changing manually \ to / and placing into double-qoutes should work.
0 new messages