Skip to content

Commit 92016ef

Browse files
committed
Merge pull request #212 from gfldex/master
add Mu.put and IO::put, add some printable newlines
2 parents 7127f00 + 488dd28 commit 92016ef

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

doc/Type/IO.pod

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ displays
3030
To print text implicitly including the trailing newline character, use
3131
L<say|/type/IO#sub_say>.
3232
33+
=head2 sub put
34+
35+
Print the given text on C<$*OUT> (standard output) with appended C<$*OUT.nl-out>. The default for the latter is the platform dependent newline sequence.
36+
37+
print 'Merry 1.0!' # Merry 1.0!␤
38+
3339
=head2 sub say
3440
3541
Print the given text, followed by a newline C<"\n"> on C<$*OUT> (standard

doc/Type/Mu.pod

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,16 @@ initializing any attributes.
164164
Prints value to C<$*OUT> after stringification using C<.Str> method without
165165
adding a newline at end.
166166
167-
"abc\n".print; # abc
167+
"abc\n".print; # abc␤
168+
169+
=head2 method put
170+
171+
multi method put() returns Bool:D
172+
173+
Prints value to C<$*OUT> after stringification using C<.Str> method adding a
174+
newline at end.
175+
176+
"abc".put; # abc␤
168177
169178
=head2 method say
170179
@@ -173,7 +182,7 @@ adding a newline at end.
173182
Prints value to C<$*OUT> after stringification using C<.gist> method with
174183
newline at end. To produce machine readable output use C<.put>.
175184
176-
say 42; # 42
185+
say 42; # 42
177186
178187
=head2 method ACCEPTS
179188

0 commit comments

Comments
 (0)