Skip to content

Commit bace8ff

Browse files
committed
[io grant] Document IO::Path*.perl
1 parent d5f7971 commit bace8ff

File tree

5 files changed

+80
-0
lines changed

5 files changed

+80
-0
lines changed

doc/Type/IO/Path.pod6

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,22 @@ respectively.
291291
say IO::Path::Win32.new("C:/rakudo/perl6.bat").parts.perl;
292292
# OUTPUT: «Map.new((:basename("perl6.bat"),:dirname("/rakudo"),:volume("C:")))␤»
293293
294+
=head2 method perl
295+
296+
Defined as:
297+
298+
method perl(IO::Path:D: --> Str:D)
299+
300+
Returns a string that, when given passed through L«C<EVAL>|/routine/EVAL»
301+
gives the original invocant back.
302+
303+
"foo/bar".IO.perl.say;
304+
# OUTPUT: IO::Path.new("foo/bar", :SPEC(IO::Spec::Unix), :CWD("/home/camelia"))
305+
306+
Note that this string includes the value of the C<.CWD> attribute that is set
307+
to L«C<$*CWD>|/language/variables#index-entry-%24%2ACWD» when the path
308+
object was created, by default.
309+
294310
=head2 method gist
295311
296312
Defined as:

doc/Type/IO/Path/Cygwin.pod6

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,22 @@ C<:$SPEC> cannot be set and defaults to
1818
L«C<IO::Spec::Cygwin>|/type/IO::Spec::Cygwin», regardless of the operating
1919
system the code is being run on.
2020
21+
=head2 method perl
22+
23+
Defined as:
24+
25+
method perl(IO::Path::Cygwin:D: --> Str:D)
26+
27+
Returns a string that, when given passed through L«C<EVAL>|/routine/EVAL»
28+
gives the original invocant back.
29+
30+
IO::Path::Cygwin.new("foo/bar").perl.say;
31+
# OUTPUT: IO::Path::Cygwin.new("foo/bar", :CWD("/home/camelia"))
32+
33+
Note that this string includes the value of the C<.CWD> attribute that is set
34+
to L«C<$*CWD>|/language/variables#index-entry-%24%2ACWD» when the path
35+
object was created, by default.
36+
2137
=end pod
2238

2339
# vim: expandtab shiftwidth=4 ft=perl6

doc/Type/IO/Path/QNX.pod6

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,22 @@ C<:$SPEC> cannot be set and defaults to
1818
L«C<IO::Spec::QNX>|/type/IO::Spec::QNX», regardless of the operating system
1919
the code is being run on.
2020
21+
=head2 method perl
22+
23+
Defined as:
24+
25+
method perl(IO::Path::QNX:D: --> Str:D)
26+
27+
Returns a string that, when given passed through L«C<EVAL>|/routine/EVAL»
28+
gives the original invocant back.
29+
30+
IO::Path::QNX.new("foo/bar").perl.say;
31+
# OUTPUT: IO::Path::QNX.new("foo/bar", :CWD("/home/camelia"))
32+
33+
Note that this string includes the value of the C<.CWD> attribute that is set
34+
to L«C<$*CWD>|/language/variables#index-entry-%24%2ACWD» when the path
35+
object was created, by default.
36+
2137
=end pod
2238

2339
# vim: expandtab shiftwidth=4 ft=perl6

doc/Type/IO/Path/Unix.pod6

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,22 @@ C<:$SPEC> cannot be set and defaults to
1818
L«C<IO::Spec::Unix>|/type/IO::Spec::Unix», regardless of the operating system
1919
the code is being run on.
2020
21+
=head2 method perl
22+
23+
Defined as:
24+
25+
method perl(IO::Path::Unix:D: --> Str:D)
26+
27+
Returns a string that, when given passed through L«C<EVAL>|/routine/EVAL»
28+
gives the original invocant back.
29+
30+
IO::Path::Unix.new("foo/bar").perl.say;
31+
# OUTPUT: IO::Path::Unix.new("foo/bar", :CWD("/home/camelia"))
32+
33+
Note that this string includes the value of the C<.CWD> attribute that is set
34+
to L«C<$*CWD>|/language/variables#index-entry-%24%2ACWD» when the path
35+
object was created, by default.
36+
2137
=end pod
2238

2339
# vim: expandtab shiftwidth=4 ft=perl6

doc/Type/IO/Path/Win32.pod6

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,22 @@ C<:$SPEC> cannot be set and defaults to
1818
L«C<IO::Spec::Win32>|/type/IO::Spec::Win32», regardless of the operating system
1919
the code is being run on.
2020
21+
=head2 method perl
22+
23+
Defined as:
24+
25+
method perl(IO::Path::Win32:D: --> Str:D)
26+
27+
Returns a string that, when given passed through L«C<EVAL>|/routine/EVAL»
28+
gives the original invocant back.
29+
30+
IO::Path::Win32.new("foo/bar").perl.say;
31+
# OUTPUT: IO::Path::Win32.new("foo/bar", :CWD("C:\\Users\\camelia"))
32+
33+
Note that this string includes the value of the C<.CWD> attribute that is set
34+
to L«C<$*CWD>|/language/variables#index-entry-%24%2ACWD» when the path
35+
object was created, by default.
36+
2137
=end pod
2238

2339
# vim: expandtab shiftwidth=4 ft=perl6

0 commit comments

Comments
 (0)