On Thu, 17 Dec 2015 09:13:52 -0800, zef...@fysh.org wrote: > IO::Path.perl produces output of the general form > $a.IO(:SPEC($b),:CWD($c)), but it turns out that this expression doesn't > actually replicate the SPEC and CWD attributes: > > > "foo".IO(:SPEC(IO::Spec::Unix), :CWD("/bar")).perl > q|foo|.IO(:SPEC(IO::Spec::Unix),:CWD</home/zefram/usr/rakudo/rakudo>) > > "foo".IO(:SPEC(IO::Spec::Win32), :CWD("C:\\bar")).perl > q|foo|.IO(:SPEC(IO::Spec::Unix),:CWD</home/zefram/usr/rakudo/rakudo>) > > Empirically, it would work to instead generate a IO::Path.new expression: > > > IO::Path.new("foo", :CWD("/bar")).perl > q|foo|.IO(:SPEC(IO::Spec::Unix),:CWD</bar>) > > IO::Path.new("foo", :SPEC(IO::Spec::Win32), :CWD("C:\\bar")).perl > q|foo|.IO(:SPEC(IO::Spec::Win32),:CWD<C:\\bar>) > > This is distinct from the string quoting issues that arise in the same > code and are being addressed in [perl #126935]. > > -zefram
Thank you for the report. This was a month or so ago, as part of the IO grant. Tests now exist in https://github.com/perl6/roast/blob/a5d933fcefd97ab15b2b2c3cefc8ec7e67a9179c/S32-io/io-path.t#L58-L91 Closing.