Skip Menu |

This queue is for tickets about the XML-Twig CPAN distribution.

Report information
The Basics
Id: 125311
Status: open
Priority: 0/
Queue: XML-Twig

People
Owner: Nobody in particular
Requestors: heiko [...] hexco.de
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: _use_perlio does not support spaces in path in $perl
Hi, thanks for your work on XML::Twig! When using print_to_file() on Windows I noticed an error message cannot find 'c:\program' ... which I traced back to the expression `$perl -V` in subroutine _use_perlio() in Twig.pm (3.52). If $perl contains a path with spaces, the error message above is produced, because the perl path is not interpreted as one argument, but instead is split at the first space. Thus Perl cannot be executed. Remedy on windows is simply this: `"$perl" -V` which protects the argument with possible spaces. I think it is portable for other OS as well. Best regards, Heiko
This looks doable ;--) Thanks, I have added the quotes, it will be in the next release. -- mirod On Mon May 14 04:45:49 2018, heiko@hexco.de wrote: Show quoted text
> Hi, > > thanks for your work on XML::Twig! > > When using print_to_file() on Windows I noticed an error message > > cannot find 'c:\program' ... > > which I traced back to the expression > > `$perl -V` > > in subroutine _use_perlio() in Twig.pm (3.52). > > If $perl contains a path with spaces, the error message above is produced, > because the perl path is not interpreted as one argument, but instead is > split at the first space. Thus Perl cannot be executed. > > Remedy on windows is simply this: > > `"$perl" -V` > > which protects the argument with possible spaces. > I think it is portable for other OS as well. > > Best regards, > Heiko