Implement IO::Handle::say the same way as the builtin say().
authorGisle Aas <gisle@activestate.com>
Sat, 20 Sep 2008 18:13:37 +0000 (18:13 +0000)
committerDavid Mitchell <davem@iabyn.com>
Tue, 23 Jun 2009 20:00:39 +0000 (21:00 +0100)
IO::Handle::say used to output $, before the newline.

p4raw-id: //depot/perl@34384
(cherry picked from commit 5eb30066fe9d342a31fbfdb741041326bde4087b)

ext/IO/lib/IO/Handle.pm

index 7788411..fa49896 100644 (file)
@@ -412,8 +412,8 @@ sub printf {
 sub say {
     @_ or croak 'usage: $io->say(ARGS)';
     my $this = shift;
-    local $\ = "";
-    print $this @_, "\n";
+    local $\ = "\n";
+    print $this @_;
 }
 
 sub getline {