scriptkitties / perl6-app-assixt

Development of this module has been moved to GitLab
https://gitlab.com/tyil/perl6-app-assixt/
GNU General Public License v3.0
4 stars 1 forks source link

Variables in « » split on spaces in their values, breaking paths with spaces #1

Closed Tyil closed 6 years ago

Tyil commented 6 years ago
08:18 <Zoffix> .tell tyil you have several bugs in your Appsixt module. Variables inside «» gets split on spaces within their values so, say, spaces in paths will break the path into separate args (`my $source = 'bar ber'.IO; dd «foo {$source.IO.path}»;`): https://gist.github.com/Whateverable/576bc17fe1eb2c081819a4e13e4a7f26

As pointed out by @zoffix, the variables used inside « » will be split on spaces, hence it can break on paths with spaces in them. Adding quotes in the right place seems to fix the issue:

> my $source = 'bar ber'.IO; dd «foo {$source.IO.path}»;
("foo", "bar", "ber")
> my $source = 'bar ber'.IO; dd «foo "{$source.IO.path}"»;
("foo", "bar ber")