Skip to content

Commit

Permalink
Show non-printables in IO::Path.perl
Browse files Browse the repository at this point in the history
Related to #126935
  • Loading branch information
lizmat committed Dec 17, 2015
1 parent af74f04 commit 2735116
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/core/IO/Path.pm
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,12 @@ my class IO::Path is Cool {
}
multi method perl(IO::Path:D:) {
my $path = Rakudo::Internals.TRANSPOSE(
Rakudo::Internals.TRANSPOSE( ($.is-absolute ?? $.abspath !! $.path),
"\\", "\\\\"),
Rakudo::Internals.PERLIFY-STR($.is-absolute ?? $.abspath !! $.path),
"|", "\\|");

$!is-absolute # attribute now set
?? "q|{$path}|.IO(:SPEC({$!SPEC.perl}))"
!! "q|{$path}|.IO(:SPEC({$!SPEC.perl}),:CWD({$!CWD.perl}))"
?? "q|$path|.IO(:SPEC({$!SPEC.perl}))"
!! "q|$path|.IO(:SPEC({$!SPEC.perl}),:CWD({$!CWD.perl}))"
}

method succ(IO::Path:D:) {
Expand Down

0 comments on commit 2735116

Please sign in to comment.