Skip to content

Commit 3cf943d

Browse files
authored
[io grant] Expand IO::Path.relative
- include info on what happens if the path is already relative
1 parent ccae74a commit 3cf943d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

doc/Type/IO/Path.pod6

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,12 @@ created with if it is not.
151151
152152
=head2 method relative
153153
154-
method relative(IO::Path:D: $base = ~$*CWD --> Str)
154+
method relative(IO::Path:D: $base = $*CWD --> Str)
155155
156-
Returns a new C<Str> object relative to the C<$base> path.
156+
Returns a new C<Str> object with the path relative to the C<$base>. If C<$base>
157+
is not provided, C<$*CWD> is used in its place. If the invocant is not
158+
an absolute path, it's first made to be absolute using the C<.CWD>
159+
attribute the object was created with, and then is made relative to C<$base>.
157160
158161
=head2 method parent
159162

0 commit comments

Comments
 (0)