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