Elizabeth Mattijsen via RT wrote:
>Fixed with 8d50dabfa9a3b690b18a

Done the hard way.  Because it lacks most of the refinements of
Str.perl, it looks like it might still have bugs that Str.perl avoids.
For example, leading combining characters will become part of the grapheme
of the opening delimiter, which won't match the closing delimiter if
the matching is grapheme-aware.  It is certainly LTA in its treatment
of unprintables.  You should (again?) consider calling .perl on the
appropriate path attribute.

The same method also has a similar escaping problem for $!CWD.  Here the
easy way doesn't just use a .perl call to escape the string; you can
use .perl for the whole :$!CWD pair.  You could profitably do likewise
for the :$!SPEC pair, which doesn't have an escaping problem but does
duplicate serialisation knowledge.  I therefore suggest (untested)

    $.is-absolute
        ?? "{$.abspath.perl}.IO({:$!SPEC.perl})"
        !! "{$.path.perl}.IO({:$!SPEC.perl}, {:$!CWD.perl})"

-zefram

Reply via email to