From: Gisle Aas Date: Tue, 24 Jan 2006 05:01:28 +0000 (-0800) Subject: Simplify &IO::Handle::say X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1576e684962a9b7e2100f3bcff6ad79fb0a8e169;p=p5sagit%2Fp5-mst-13.2.git Simplify &IO::Handle::say Message-ID: p4raw-id: //depot/perl@26941 --- diff --git a/ext/IO/lib/IO/Handle.pm b/ext/IO/lib/IO/Handle.pm index e3b3f7f..86df089 100644 --- a/ext/IO/lib/IO/Handle.pm +++ b/ext/IO/lib/IO/Handle.pm @@ -409,16 +409,10 @@ sub printf { printf $this @_; } -if ($] >= 5.009003) { - *say = eval q{ sub { - @_ or croak 'usage: $io->say(ARGS)'; - my $this = shift; - use feature 'say'; - say $this @_; - }}; -} -else { - *say = sub { croak "say() is not implemented for this version of perl\n" }; +sub say { + @_ or croak 'usage: $io->say(ARGS)'; + my $this = shift; + print $this @_, "\n"; } sub getline {